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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

How to reject a request on AWS API Gateway if it contains unknown query parameters?

I am using API Gateway integrated with OpenAPI 3.0 to validate incoming requests before sending them to Lambda. API Gateway is validating the request body as I expect based on the OAS request schema ...
ievinm's user avatar
  • 53
0 votes
1 answer
8 views

OpenAPI 3.0 Specification Extensions with PHP Attributes

I am programming an API with the Open API 3.0 Scheme and Swagger. According to swagger specification one is allowed to add custom properties named like x-... I am using PHP Attributes, example: #[...
darvinde's user avatar
0 votes
0 answers
6 views

@ExampleObject description attribute not empty in Swagger online editor (produced by springdoc-openapi-ui 1.7.0)

I'm facing this issue that also if the description attribute for the @ExampleObject (doc) annotation is empty, in the swagger online editor it is show, and it takes the name of the example. Here my ...
fforfabio's user avatar
2 votes
1 answer
51 views

Springboot OffsetDateTime in response entity is serialized as BigDecimal

I have an instance that contains a property time of type OffsetDateTime which i'm expecting its serialized value to be written in string when returning the instance in a response entity object, but ...
Oscar Reyes's user avatar
  • 4,263
0 votes
0 answers
25 views

How to enable CORS for specific endpoints using ESPv2 on GCP

currently I have the following code in openapi.yml.j2: swagger: "2.0" info: ... host: {{ deployment_name }}.endpoints.{{ gcloud_project }}.cloud.goog x-google-endpoints: - name: {{ ...
zen123's user avatar
  • 1
0 votes
1 answer
25 views

How to create an additional YAML file for Swagger UI instead of a replacing one?

I have 2 Spring profiles. There's one difference between them that I need to have included in my Swagger UI. These profiles use a different server. I have @OpenApiDefinition with a bunch of lines of ...
IceMajor's user avatar
  • 127
-2 votes
1 answer
16 views

Swagger UI: TypeError: NetworkError when attempting to fetch resource on deployed application

I've just deployed my application (Spring Boot + Vaadin) to a free hosting (alwaysdata.com). Everything seems to be working really good so far, but the Swagger UI. I can't make any call to my API ...
IceMajor's user avatar
  • 127
1 vote
0 answers
12 views

OpenAPI /api-docs returns result to parse as JWT string instead of JSON

I have spring boot application, 2.7.14. I added OpenAPI in it and but problem is that i can get endpoints. When swagger or me send request to /api-docs enpoint it returns JWT parsed string not JSON. I ...
mehmet's user avatar
  • 65
0 votes
0 answers
13 views

How to override method cache settings by default in API Gateway using OpenAPI Spec?

Here's the setup: We have an API Gateway that is deployed through the OpenAPI Spec. The API Gateway resource itself is created by terraform, but any configuration is controlled via the spec. We have ...
Arko Chakraborti's user avatar
0 votes
1 answer
26 views

OpenAPI Yaml how to define Enum inheritance

I'm working on a Springboot REST API designed in yaml file as follow. /controller/myApi: post: tags: - ... operationId: postNewStudent requestBody: content: ...
blaiso's user avatar
  • 347
0 votes
0 answers
16 views

I am using openApi 1.6.15 with springboot but I am getting example value as null for all APIS

I am using openApi 1.6.15 with springboot But I am getting example value as null for all APIS I should get values which are passing in request body. Current behavior: Expected behavior:
Khaleel Basha P's user avatar
3 votes
0 answers
56 views

How to protect /docs endpoint in FastAPI using Azure AD (fastapi_msal)?

How to connect the Authorize button in protect under /docs endpoint in FastAPI application to Azure AD? Is it possible to make Authorize button to trigger a popup for the sign in window? Similar to ...
starking's user avatar
  • 183
0 votes
0 answers
41 views

Spring boot 3 - springdoc-openapi-starter-webmvc-ui not working with openapi-generator-maven-plugin api generator

I'm using spring boot 3, & i'm trying to generate openapi documentation in /swagger/index.html. I found out that it's enough to add the following dependency alone : <dependency> <...
anassm's user avatar
  • 1
-1 votes
0 answers
25 views

Open API Failed to load API definition

I'm migrating from SpringFox over to OpenAPI and I am running into issues loading the API definition When trying hit the api-docs endpoint I am getting 500 errors From the stack trace I can see this ...
itms's user avatar
  • 201
1 vote
1 answer
49 views

OpenAPI: Add authorization header to all api gateway requests

I am currently setting up first API Gateway with Google cloud platform but I am now a little confused how I can add a header to all requests, is it possible in the .yaml file? Here's what it looks ...
Oscar Berggren's user avatar
0 votes
0 answers
10 views

Migration springfox ParameterBuilderPlugin to openapi 2.2.0

I have a project with java 11 and spring boot 2.3.0 and swagger 3.0. Now i have to migrate this project to java 17 with spring boot 3.1.4 and openapi 2.2.0. I have this class import org....
Cristopher Tinnirello's user avatar
0 votes
0 answers
19 views

Spring Boot OpenAPI 3.0 Error Handling on Specific Endpoints

I have a little question for you. I have a spring boot app that has some authorization mechanism, meaning that some endpoints under /private path requires some priviliges. I've already written this ...
azuosxela's user avatar
  • 210
0 votes
0 answers
13 views

How to declare correctly a route with facultative authentication in openApi 3.0 specification?

I have a route that returns the content of a public article. If the user is logged, the route returns a different content (a content with additionnal details). I don't know how to declare this in my ...
0urz4g's user avatar
  • 121
0 votes
0 answers
33 views

Azure Function App Microsoft Identity Provider authentication. Make OpenAPI/Swagger endpoints anonymous

I'm using Azure Active Directory identity provider to secure my Azure Function App. This setup: https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad?tabs=workforce-...
Loc Dai Le's user avatar
  • 1,671
0 votes
0 answers
19 views

SpringFox v3.0.0 get generated JSON and YAML files - store in project source (java resources)

I want to generate JSON and YAML files with my api spec everytime I build application (Gradle/Maven) that will be stored somewhere in project directory structure, is it possible other than by ...
Kovo's user avatar
  • 444
0 votes
1 answer
36 views

Spring Resource Server (OAuth2.1) with OpenAPI/Swagger-UI

Background: I have 2 applications: Spring Authorizarion Server which authenticates the user via the authorization_code flow. Another scenario also with PKCE. http://192.168.0.4:8001 Spring Resource ...
S34N's user avatar
  • 7,529
0 votes
0 answers
14 views

Swagger UI keeps loading

Hi I am using spring reactive programming and using below dependencies. when i am hitting swagger url in browser it's keep loading. Could someone helps what mistake i am making my swaggar config class:...
art's user avatar
  • 1
0 votes
1 answer
13 views

SpringFox 3.0.0 internally using swagger v2, but on localhost swaggerUI openAPI v3 file can be downloaded

I will explain the problem. I wrote following code to have static files generated in my SpringBoot project: package com.kovospace.paster.base.swagger; import com.fasterxml.jackson.databind.JsonNode; ...
Kovo's user avatar
  • 444
0 votes
0 answers
6 views

In APIFlask, can auth be used to protect the Swagger endpoints?

I have an APIFlask app that servers Swagger UI and OpenAPI spec endpoints. (/docs and /openapi.json, respectively.) I have successfully implementer JWT-based Bearer auth to protect my own endpoints, ...
odigity's user avatar
  • 7,620
0 votes
0 answers
8 views

Can specmatic spec files provide a response table for the Examples?

From the docs on externalizing the examples https://specmatic.in/documentation/contract_tests.html it says Scenario “Update Employee Success” - We have not added response examples, however Specmatic ...
Mark Gargan's user avatar
0 votes
0 answers
12 views

Is it possible to use the _data folder for provider tests the same way that stub tests allow

Is it possible to use the _data folder with json examples when running provider tests (Spring Boot) API in the same way it's possible to do it with stub tests? I have a quote-api.yaml contract in src/...
Mark Gargan's user avatar
-1 votes
1 answer
38 views

The converter specified on "enum" does not derive from JsonConverter or have a public parameterless constructor( Swagger | Enum)

I am trying to include swagger in our jsonapi api. I have included the necessary packages , mentioned from the JsonApiDotNetCore team. While adding swagger hooks in Program.cs , I am trying to ...
kostas.kapasakis's user avatar
2 votes
0 answers
33 views

Grpc-gateway or maintain simultaneous REST and GRPC servers?

I have mostly used REST or grpc separately in services. When I needed both, used go-kit. But in my new project, OpenAPIv3 is a high want on the REST side and grpc is also needed. I have two options: ...
aloha's user avatar
  • 1,581
0 votes
0 answers
21 views

Order of parameters in a method generated from Swagger/OpenAPI definition

A bit of context. In my system ServiceB calls ServiceA. The ServiceA provides a Swagger/OpenAPI definition, which ServiceB uses to generate its client code. ServiceA requires some custom header ...
Panicking Developer's user avatar
1 vote
2 answers
29 views

OpenAPI spec for abstract classes

I'm using SpringBoot 3.1.3 java17 and I have situation similar to follows. I have a CommonReadOnlyService like this: public class CommonReadOnlyService<T, ID, R extends JpaRepository<T, ID>&...
CoderJammer's user avatar
1 vote
0 answers
16 views

OASDiff circular dependecy issue

I'm currently using OASDiff to track changes in a Swagger REST API, and I've encountered an issue with circular dependencies in my JSON schema. Unfortunately, I can't modify the JSON schema to resolve ...
Darshil Shah's user avatar
1 vote
1 answer
19 views

How to gather webflux client metrics when client is generated by OpenAPI

in our Spring Boot application we are using actuator and integrated prometheus. Now we would like to gather HTTP client metrics. In our scenario we are using OpenAPI specification for defining the ...
Chris Brown's user avatar
0 votes
0 answers
19 views

Openapi 6.6.0 / 7 maven plugin for spring does not generate import statement for @JsonIgnoreProperties

In both versions openapi 6.6.0 / 7 maven spring generator with schema having discriminator, generates @JsonIgnoreProperties but the java file does have import statement for com.fasterxml.jackson....
bmk's user avatar
  • 1
0 votes
1 answer
8 views

Can OpenAPI specify what the endpoint returns right in the paths responses itself?

Per https://swagger.io/docs/specification/describing-responses/, a typical endpoint responses specification is: paths: /ping: get: responses: '200': description: OK ...
xpt's user avatar
  • 20.6k
0 votes
1 answer
29 views

How do you change the underlying generator version with the OpenAPI Generator CLI npm package?

OpenAPITools has an npm package called openapi-generator-cli. This package is described as follows on their GitHub page: The OpenAPI Generator is a Java project. openapi-generator-cli will download ...
Eric's user avatar
  • 93
0 votes
1 answer
44 views

OpenAPI generator for NextJS

I have a NextJS project which uses the /api path for implementation of our API. We use an openapi.yaml file to define the interface. The following command generates the API client and works great: ...
checklist's user avatar
  • 12.4k
1 vote
1 answer
49 views

Generate Swagger/OpenAPI 2.0 yaml spec file from a Spring Boot 3.0 project

I need to generate a Swagger/OpenApi (preferably 2.0) .yaml spec file for an existing Spring Boot 3.0 restful api project. I don't want to have a swagger-ui page because this project isn't meant to be ...
BlueBoy's user avatar
  • 818
0 votes
0 answers
9 views

OpenAPi Typescript/Axios generator: 3 mediatypes supported but only one client method generated

I have an API with an endpoint that can produces 3 differents mediatypes. The api description looks like this: { "openapi" : "3.0.1", "info" : { "title" ...
Julien Berthoud's user avatar
1 vote
1 answer
71 views

Enum query param does not work - openapi-generator

I use openapi-generator-maven-plugin version 7.0.0 for OpenAPI swagger spec to Java code generation. <plugin> <groupId>org.openapitools</groupId> <artifactId>openapi-...
Tsvetoslav Tsvetkov's user avatar
0 votes
1 answer
20 views

Open API v3- get rid of type from schema

we are migrating one of our project from swagger v2 to OpenAPI v3 version and we are facing a scenario where the header has no type. i.e., manually updating the generated swagger file for the header ...
Prathyusha's user avatar
-1 votes
2 answers
20 views

ASP.NET Core Swagger error: "Fetch error Internal Server Error"

I'm using all the latest Nuget Packages for ASP.NET Core Rest Server with Swagger I cannot find how to fix the error described at the bottom (with code also). I tried: Adding Route attribute Adding a ...
Eric Ouellet's user avatar
  • 11.1k
-2 votes
1 answer
14 views

Add Logic App to API Managment Service Fails [closed]

I have created a API Management Service and I am trying to add a Logic App I created to it but get an error as shown below. I am not sure what this means so any pointers would be most appreciated. The ...
Admins's user avatar
  • 1
0 votes
0 answers
145 views

Javascript code generation : Self $ref attributes type not adding to import section which leads to "ReferenceError: XXXXX is not defined"

Swagger.yaml: openapi: 3.0.1 info: title: Test API version: "1.0" servers: - url: http://localhost:9005/v1 - url: https://localhost:9005/v1 security: - OAuth2: [] components: ...
Rajesh Reddy Ananthula's user avatar
0 votes
0 answers
36 views

OpenAPI documentation for External API in Spring Boot 3 project

I am using Spring Boot 3 and using OpenAPI by having this in the pom.xml <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-starter-webmvc-ui&...
Wee's user avatar
  • 278
0 votes
0 answers
19 views

How to customize the order of groups in Open API definitions

I have a Jhipster generated reactive spring-boot application. By default jhipster generates 2 different groups in open api definitions: default and management. In the UI, default is the first option ...
Rithu's user avatar
  • 79
1 vote
0 answers
29 views

Generate URL constants in openapi generator

I've read some excerpts from the documentation of the openapi generator but haven't been able to find something about URL constants. Can it generate String constants for each endpoint? For example I ...
ka3ak's user avatar
  • 2,477
0 votes
0 answers
27 views

How to add common headers using springdoc-openapi v2.2.0

I use springdoc-openapi v2.2.0 to generate the swagger document. <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-starter-webmvc-ui</...
ildvzg68472's user avatar
1 vote
1 answer
34 views

OpenAPI: Conditional schema of one parameter depending on value of another

Hi have an OpenAPI specification which contains following: { "/mypath" : { "get": { ... "parameters" : [ { "in": "query&...
S-Man's user avatar
  • 22.6k
1 vote
1 answer
33 views

openAPI polymorphism - getting generated file to extend another schema

so im pretty new to openAPI and trying to get one schema to extend another. I have it working to a certain extent in that I have two objects, a vehicle and a car (which should extend the vehicle ...
J145's user avatar
  • 619
0 votes
0 answers
13 views

FastAPI - Swagger, Is there a way to apply a global dropdown menu for organizing schemas?

Working on Backend with Django, FastAPI, and Swagger. I've been tasked with creating a dropdown list (similar to the one in the image) where I should be able to select schemas related to any of the ...
JA VHM's user avatar
  • 1

1
2 3 4 5
87