We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explore new openapi 3.1 generic possibilities
See
And example (https://editor-next.swagger.io):
openapi: 3.1.0 info: title: Swagger Petstore - OpenAPI 3.0 version: 1.0.11 servers: - url: https://petstore3.swagger.io/api/v3 tags: - name: user description: Operations about user paths: /user: post: tags: - user summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: description: Created user object content: application/json: schema: $ref: '#/components/schemas/User' responses: default: description: successful operation content: application/json: schema: $ref: '#/components/schemas/objWithTypedArray' /user/createWithList: post: tags: - user summary: Creates list of users with given input array description: Creates list of users with given input array operationId: createUsersWithListInput requestBody: content: application/json: schema: type: array items: $ref: '#/components/schemas/User' responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/PageUser' default: description: successful operation components: schemas: User: $id: User.Id type: object properties: id: type: integer format: int64 username: type: string firstName: type: string lastName: type: string Page: $id: PageId type: object properties: content: type: array items: $dynamicRef: "#page.content" $defs: allowAll: $dynamicAnchor: page.content first: type: boolean last: type: boolean totalElements: type: number totalPages: type: number PageUser: $id: page.user $ref: PageId $defs: pageOfUser: $dynamicAnchor: page.content type: object $ref: User.Id genericArrayComponent: $id: fully_generic_array type: array items: $dynamicRef: "#generic-array" $defs: allowAll: $dynamicAnchor: generic-array numberArray: $id: array_of_numbers $ref: fully_generic_array $defs: numbersOnly: $dynamicAnchor: generic-array type: number stringArray: $id: array_of_strings $ref: fully_generic_array $defs: stringsOnly: $dynamicAnchor: generic-array type: string objWithTypedArray: $id: obj_with_typed_array type: object required: - dataType - data properties: dataType: enum: - string - number oneOf: - properties: dataType: const: string data: $ref: array_of_strings - properties: dataType: const: number data: $ref: array_of_numbers
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Explore new openapi 3.1 generic possibilities
See
And example (https://editor-next.swagger.io):
The text was updated successfully, but these errors were encountered: