Relative Content

Tag Archive for openapi

OpenAPI Auth Flow with csrf token

I’m writing an OpenAPI spec for an external API. The API requires two steps for authentication. The user first needs to GET / to obtain a session cookie and a CSRF token. Then, the user logs into via POST /login with the session cookie and logs into the session.

Questions about /q/openapi http request enhancements to Quarkus-SmallRye-Openapi using filters in the QUARKUS extension

I am using
quarkus-smallrye-openapi
in the quarkus project, I do not plan to use native UI pages, I use knife4j ui interface myself, so far I have written a quarkus extension to implement this function. However, it is not perfect, because I want to sort the request interface of the ui interface. Unfortunately, quarkus-smallrye-openapi does not provide such a function, so I want to enhance the /q/openapi http request through filters. But the filter did not work on this /q/openapi http request, why? What should I do? Here is the code for my filter.

OpenApi – oneOf – types are string not object

I have an openapi spec where one of the objects can contain only one of 2 ids: type1 id or type2 id. Each of these ids is just of type string. The official docs show the use of refs when using oneOf, which would suggest that they need to be an object but in my case the 2 types are just of type string.

allowEmptyValue in an OpenAPI 3.0 form parameter?

Swagger/OpenAPI 2.0 had in: formData, which was supposedly superseded by contentBody in 3.0, where every such parameter becomes a Schema Object inside a Media Type Object. However, JSON Schema doesn’t seem to define allowEmptyValue (or an equivalent).

how to override one of the standard open Api responses ? Can i make it?

responses: # Если стандартные ответы (см ./responses) allOf: – $ref: ‘./responses#’ 200: <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<override HERE description: OK content: I have external file ‘./responses.yaml’. It has 200, 400, 500 answers and i want to use them but i need to override one of them: … 200: description: OK content: application/json: schema: …. 201: description: OK content: application/json: […]