Questions tagged [openapi]

The OpenAPI Specification, originally known as the Swagger Specification, is a specification for machine-readable interface files for describing, producing, consuming, and visualizing RESTful Web services.

A variety of tools can generate code, documentation and test cases given an interface file. Development of the OpenAPI Specification (OAS) is overseen by the Open API Initiative, an open source collaborative project of the Linux Foundation.

Ref: https://en.wikipedia.org/wiki/OpenAPI_Specification

Related tags

4284 questions
2
votes
1 answer

Mandatory header for all API in openapi 3.0

I am using OpenAPI 3.0 with Spring-boot 5 and therefore have no configuration YAML. I have a header that contains the client Identification ID(This is not an authentication header). I want to make that a mandatory header param. Added below OpenAPI…
Akash
  • 387
  • 1
  • 5
  • 19
2
votes
0 answers

OpenAPI/Swagger - How to specify different logging level for only certain APIs

I have been recently working on a project using OAS 3.0 with swagger editor and codegen to generate my Python back-end server code. And it's been a while since I was trying to find an answer for this. My openapi definition is in yaml and it…
JasonLi
  • 249
  • 3
  • 9
2
votes
1 answer

OpenAPI support for Kotlin router DSL in Springboot2

We are moving a codebase to use Kotlin router DSL in a springboot 2 APP. Currently we are using @RestController and kotlin with OpenAPI annotations and this works just fine. Is anyone aware of any support in the OpenAPI/Swagger annotations for this…
user3241602
  • 91
  • 1
  • 5
2
votes
0 answers

Using Swagger Annotations to generate XML namespace information

My XML request looks like this: : A request to my endpoint I believe it should be modeled in Swagger/OpenAPI 3 spec as follows: MyRequest: …
Steve
  • 21
  • 2
2
votes
1 answer

How do I access the OpenApi endpoint in WildFly 18+?

I have a war with MicroProfile OpenApi annotations. When I run it on Payara or OpenLiberty, I can access the OpenApi document at http://localhost:8080/openapi, as specified in the spec. This does not work on WildFly 18 nor on 19 Beta 1, even though…
rü-
  • 2,129
  • 17
  • 37
2
votes
0 answers

How to replace Quarkus Swagger UI?

I'm using Quarkus 1.1.1.Final and I've enabled smallrye-openapi. As a default, Quarkus OpenAPI bundles Swagger UI, but OpenAPI official generator is using RapiDoc. (RapiDoc - Web Component based Swagger & OpenAPI Spec Viewer…
tkhm
  • 860
  • 2
  • 10
  • 30
2
votes
1 answer

SpringFox @ApiModelProperty for Optional

I'm trying to use SpringFox 2.8+ to generate a model for class containing Optional fields. Docket configuration has genericModelSubstitutes(Optional.class) rule, that perfectly works for Optional. But when the type is…
Adamovskiy
  • 1,376
  • 1
  • 12
  • 42
2
votes
2 answers

Unable to show Custom Header in Open API UI

How to set Custom Header when using Open API 3? I am using Spring Boot + springdoc-openapi-ui example. In this example I am looking to pass the different headers in the request. Below configurations doesn't show option to select the customer…
PAA
  • 1
  • 46
  • 174
  • 282
2
votes
1 answer

Passing values from CloudFormation to Swagger file

I'm creating my infrastructure using CloudFormation. I'm hoping to create the API using "API Gateway Extensions to OpenAPI" https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html Relevant code segment looks…
2
votes
1 answer

How to define Map objects in Open API 3.0, for GET API

I have GET API, which takes Map as a request param. How to define this in Open API 3.0, in yaml format @GetMapping public void getDevicesInfo(@RequestParam(required = false) Map parameters) { } Open API is not supporting Map type.
Mamatha K
  • 21
  • 1
  • 6
2
votes
1 answer

Cookie not being stored in browser after call with Axios

I am playing with creating a simple authentication system and have a simple play project at: https://github.com/ericg-vue-questions/authentication The main technologies I am using are: FastAPI for the backend server Vue for the frontend UI axios…
ericg
  • 8,413
  • 9
  • 43
  • 77
2
votes
2 answers

Generating Swagger/OpenAPI views in Micronaut when using Kotlin only

The official docs at https://micronaut-projects.github.io/micronaut-openapi/latest/guide/index.html only describe how to add the -Dmicronaut.openapi.views.spec=... compiler flag to the JavaCompile Gradle task: tasks.withType(JavaCompile) { …
lathspell
  • 3,040
  • 1
  • 30
  • 49
2
votes
0 answers

What should be used for multiple authentication in swagger (anyOf or oneOf)?

I'm developing validation against a swagger schema. I have a question regarding multiple authentications, imagine I have a security block security: - header - cookie Logic is like this - parse a user request, and put header/cookie inside some…
2
votes
1 answer

Swagger / Openapi with openapi-generator where do we add the business logic code?

I have to create a rest api from scratch. I have already some experience with Jersey by doing mostly everything manualy. I wanted to do it right now as this project is new. So I am currently trying the pet store sample that is available every time I…
iXô
  • 1,133
  • 1
  • 16
  • 39
2
votes
0 answers

OpenApi Spring generator - missing model files

I can sucessfully generate Spring API and model files using gradle, OpenApi generator plugin ("org.openapi.generator" version "4.2.1"). I have a single api.yml file: openapi: 3.0.2 info: title: API Documentation version: 1.0.0 servers: - url:…
zolv
  • 1,720
  • 2
  • 19
  • 36