swagger-editor

OpenAPI 3.0 - allOf inside oneOf

帅比萌擦擦* 提交于 2021-02-17 03:33:19
问题 The following YAML: openapi: 3.0.0 info: title: test version: 1.0.0 paths: /test: get: summary: test responses: '200': description: Test content: application/json: schema: oneOf: - allOf: - type: object properties: firstA: type: string - type: object properties: firstB: type: string - allOf: - type: object properties: secondA: type: string - type: object properties: secondB: type: string Does not render at all in the swagger editor. In ReDoc it also fails to render properly: If nesting

Swagger: Additional properties not allowed: allOf

让人想犯罪 __ 提交于 2021-02-07 10:24:12
问题 I'm trying to figure out this swagger API inheritance stuff by using allOf . This is my swagger yaml file. swagger: '2.0' info: title: Test API version: '1' basePath: /api/v1 schemes: - https produces: - application/json paths: /users: get: summary: Collection of users tags: - users responses: 200: description: A list of Users schema: $ref: "#/definitions/Users" 500: $ref: "#/responses/BadRequest" definitions: User: required: - username properties: firstName: type: string lastName: type:

Swagger: Additional properties not allowed: allOf

匆匆过客 提交于 2021-02-07 10:23:20
问题 I'm trying to figure out this swagger API inheritance stuff by using allOf . This is my swagger yaml file. swagger: '2.0' info: title: Test API version: '1' basePath: /api/v1 schemes: - https produces: - application/json paths: /users: get: summary: Collection of users tags: - users responses: 200: description: A list of Users schema: $ref: "#/definitions/Users" 500: $ref: "#/responses/BadRequest" definitions: User: required: - username properties: firstName: type: string lastName: type:

Open API 3 - add headers on individual content-type in responses

你离开我真会死。 提交于 2021-01-03 06:52:24
问题 I have my spec which have a path with a 200 response code, that response code can access multiple content-types, I want to add the Content-Disposition Header to one of those content-types. Here's a sample: openapi: '3.0.3' info: ... servers: ... paths: /examples: ... get: ... responses: '200': content: application/json: ... application/pdf: encoding: file: headers: Content-Disposition: schema: type: string example: attachment; filename="name.pdf" examples: file: summary: File externalValue:

Open API 3 - add headers on individual content-type in responses

↘锁芯ラ 提交于 2021-01-03 06:50:07
问题 I have my spec which have a path with a 200 response code, that response code can access multiple content-types, I want to add the Content-Disposition Header to one of those content-types. Here's a sample: openapi: '3.0.3' info: ... servers: ... paths: /examples: ... get: ... responses: '200': content: application/json: ... application/pdf: encoding: file: headers: Content-Disposition: schema: type: string example: attachment; filename="name.pdf" examples: file: summary: File externalValue:

Open API 3 - add headers on individual content-type in responses

点点圈 提交于 2021-01-03 06:49:58
问题 I have my spec which have a path with a 200 response code, that response code can access multiple content-types, I want to add the Content-Disposition Header to one of those content-types. Here's a sample: openapi: '3.0.3' info: ... servers: ... paths: /examples: ... get: ... responses: '200': content: application/json: ... application/pdf: encoding: file: headers: Content-Disposition: schema: type: string example: attachment; filename="name.pdf" examples: file: summary: File externalValue:

Open API 3 - add headers on individual content-type in responses

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-03 06:48:01
问题 I have my spec which have a path with a 200 response code, that response code can access multiple content-types, I want to add the Content-Disposition Header to one of those content-types. Here's a sample: openapi: '3.0.3' info: ... servers: ... paths: /examples: ... get: ... responses: '200': content: application/json: ... application/pdf: encoding: file: headers: Content-Disposition: schema: type: string example: attachment; filename="name.pdf" examples: file: summary: File externalValue: