openapi

How to set the Accept header globally in OpenAPI 3.0?

本小妞迷上赌 提交于 2020-03-16 05:39:08
问题 I have a new OpenAPI setup via SwaggerHub. Is there an option to force a certain Accept header globally? I have set up the Content-Type on the response: openapi: 3.0.0 paths: /test-path: get: responses: '200': description: OK content: application/vnd.company.v1.0.0+json: When inserting a different Accept header via cURL request, the following out is made: {"message":"Missing matching response for specified Accept header"} That makes sense, since we aren't providing any response for that. 回答1:

Exact purpose of tags in OpenAPI and why are they unique

两盒软妹~` 提交于 2020-03-16 05:38:59
问题 By Specification: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique. How are these tags used in parsers, can you provide some

Exact purpose of tags in OpenAPI and why are they unique

陌路散爱 提交于 2020-03-16 05:37:50
问题 By Specification: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique. How are these tags used in parsers, can you provide some

Exact purpose of tags in OpenAPI and why are they unique

笑着哭i 提交于 2020-03-16 05:36:27
问题 By Specification: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique. How are these tags used in parsers, can you provide some

OpenAPI 3 Custom type in Authorization header

风格不统一 提交于 2020-02-25 21:32:04
问题 I am looking for the proper way to specify an Authorization header with a custom type like ApiKey in openAPI 3. The custom Authorization header should look like Authorization: ApiKey myAPIKeyHere All my attempts to specify the securitySchemes entry with type apiKey seems to produce other results... The closest I got is something like: securitySchemes: ApiKeyAuth: type: apiKey in: header name: ApiKey ... but then, the key is not in the Authorization header. How can such a requirement be

Write swagger doc that consumes multiple content types e.g. application/json AND application/x-www-form-urlencoded (w/o duplication)

好久不见. 提交于 2020-02-19 06:01:23
问题 I'm looking for an elegant way to define an api that can consume JSON data as well as form data. The following snippet works, but it's not elegant and requires all kind of ugly code in the backend. Is there a better way to define this? What works right now: paths: /pets: post: consumes: - application/x-www-form-urlencoded - application/json parameters: - name: nameFormData in: formData description: Updated name of the pet required: false type: string - name: nameJSON in: body description:

How to Globally ignore API of Spring Boot from Open API 3 specification?

一曲冷凌霜 提交于 2020-02-14 02:26:46
问题 I went through the documentation: https://springdoc.github.io/springdoc-openapi-demos/faq.html#how-can-i-ignore-some-field-of-model- already, but documents are not very clear, I have Spring Boot REST HATEOAS implementation project and using Open API 3 specification instead of Swagger . I've Pagination implemented for each endpoints, but some how my industry standards expecting content as a plural contents. But since this is part of Pageable API I am not able to override it, instead looking to

how to add a service account security definition in openapi yml file

丶灬走出姿态 提交于 2020-02-04 22:18:01
问题 I want to add a security definition to an API to run it in the google cloud scheduler (using OIDC token, and a service account).My openapi.yml looks like this "/common/test": post: description: "test" operationId: "test" responses: 200: description: "Success" 400: description: "Fail" security: - service_account: [] securityDefinitions: service_account: authorizationUrl: "" flow: "implicit" type: "oauth2" x-google-issuer: "xx@example.iam.gserviceaccount.com" x-google-jwks_uri: "https://www

how to add a service account security definition in openapi yml file

房东的猫 提交于 2020-02-04 22:17:52
问题 I want to add a security definition to an API to run it in the google cloud scheduler (using OIDC token, and a service account).My openapi.yml looks like this "/common/test": post: description: "test" operationId: "test" responses: 200: description: "Success" 400: description: "Fail" security: - service_account: [] securityDefinitions: service_account: authorizationUrl: "" flow: "implicit" type: "oauth2" x-google-issuer: "xx@example.iam.gserviceaccount.com" x-google-jwks_uri: "https://www

Is it possible to get Keycloak's REST api definitions in yaml or json?

非 Y 不嫁゛ 提交于 2020-01-30 08:13:05
问题 Is it possible somehow to get openapi (or swagger) definitions for Keycloak's REST endpoints in yaml or json format? Everything I could find was documentation. 回答1: There are some user-contributed definitions in this PR: https://github.com/keycloak/keycloak/pull/5198 (1, 2) but no official OpenAPI definition yet. Follow this issue for updates. 来源: https://stackoverflow.com/questions/56163439/is-it-possible-to-get-keycloaks-rest-api-definitions-in-yaml-or-json