Ask a Question

How to add string array in schema

HARSHD
Visitor

How to add string array in schema

While documenting schemas, tool is not accepting array of strings. Getting validation error as `items` must be an object.

 

Used syntax as below:

 

data:
                     type: array
                     items: 
                      - type: 
                        format: string
                        description: Entity type.
                      - id: 
                        type: string
                        description: Unique identifier 

 

1 REPLY 1
chichepo
Frequent Contributor

Hi @HARSHD 

I would recommend a more "traditional" construction:

chichepo_0-1680108054247.png

chichepo_1-1680108107187.png

or, if you prefer:

chichepo_2-1680108813648.png

 

cancel
Showing results for 
Search instead for 
Did you mean: