How to define multiple objects to the definitions or components #3062
Replies: 2 comments 2 replies
-
ErrorCode:
type: object
properties:
code:
type: integer
field:
type: string
enum:
- code: 1001
field: missing_file
- code: 1002
field: invalid_file
... |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
handrews
-
Answered from the spec perspective, tooling support questions should go to tooling vendors, so closing this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi ,
I have a definition (swagger-2.0)
I would like to add possible value for this structure into openapi documentation. Practically, code and field corresponds to the same thing (one in numerical and the other in English). I would like all the possible objects be part of the openAPI document, so the client can translate them into multiple languages if needed.
For example
How to specify all the ErrorCode in the openapi document
Beta Was this translation helpful? Give feedback.
All reactions