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
2 answers

Can I suppress the default Optional getRequest() that OpenAPI generates into interfaces?

I have an OpenAPI 3.0 file that specifies two REST resources with operations, let's say: openapi: 3.0.0 [...] paths: /a: post: [...] /b post: [...] Then I use the openapi-generator-maven-plugin like:
Florian
  • 4,821
  • 2
  • 19
  • 44
2
votes
1 answer

OpenAPI Security Scheme: What is 'type' used for in Cookie auth?

OpenAPI allows you to specify various security schemes for authentication and authorization: basic auth, OAuth 2.0, etc. Among them is the simple scheme of having a token or key send in a specific cookie header field: Cookie Authentication. A cookie…
fgysin
  • 11,329
  • 13
  • 61
  • 94
2
votes
1 answer

Automatic add openapi file in helidon project

I want instrument for automatic generate openapi in my helidon project (Java 1.8, helidon SE 1.3.1) I read documenttation/example and make: add depends in maven add openapi.yml in META-INF add endpoint for router. add apifilter and…
2
votes
0 answers

OpenAPI specification for calDAV?

I'm about to embark on some work around a calDAV server implementation. calDAV is specified in a series of RFC: rfc4918: HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV) rfc4791: Calendaring Extensions to WebDAV…
stwissel
  • 20,110
  • 6
  • 54
  • 101
2
votes
2 answers

OpenAPI custom generator with Maven plugin fails with ClassNotFoundException

I'm trying to write an OpenAPI custom generator as mentioned at openapi-generator on GitHub. Generated the codegen with below command. java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar meta \ -o out/generators/my-codegen -n…
Maduranga Siriwardena
  • 1,341
  • 1
  • 13
  • 27
2
votes
3 answers

Including info object in swagger maven plugin configuration

I am having trouble including an info object in my swagger output json file. I am using the swagger-maven-plugin from https://github.com/swagger-api/swagger-core. Here is what I have tried... I have tried including an info object in my pom.xml like…
GNG
  • 1,341
  • 2
  • 23
  • 50
2
votes
1 answer

How to prevent Swagger from following 302 Redirects?

So I have an API in swagger that works properly. However, I want to disable it automatically following 302 redirect as I need the query params on the Location header of a 302. Is there any way how to do it in Swagger / Open API 3?
iamjoshua
  • 1,157
  • 3
  • 16
  • 33
2
votes
1 answer

Is is possible to change the contents of the Example Value section generated by NSwag?

We are using NSwag to generate swagger pages for our API. We have a fictitious asp.net core 2.2 controller and the generated swagger pages looks like this: Is it possible to change the contents of the Example Value (highlighted in yellow)? We would…
Yves Rochon
  • 1,492
  • 16
  • 28
2
votes
1 answer

Swashbuckle OperationFilter to Add Parameter of Type Object

I have a C# object public class MyObject { public int property1 { get; set; } public string property2 { get; set; } public string property3 { get; set; } } I want to create a parameter of type object that has the schema of MyObject. public class…
Duncan Gichimu
  • 456
  • 1
  • 5
  • 17
2
votes
1 answer

Transform Swagger parameter names to Postman variables on import

I have a set of Swagger file that defines the parameters in the usual manner. For instance: parameters: - $ref: '#/parameters/authorization' ... parameters: authorization: name: Authorization description: '' required: true …
empire29
  • 3,729
  • 6
  • 45
  • 71
2
votes
0 answers

Auto-generate JUnit testcases based on API spec, in Java

I am looking for options that can auto-generate JUnit testcases based on API spec(OpenAPI based). I have a yaml which is readable from Swagger.
2
votes
1 answer

Swagger-php adding a "schema" property on every Model property

(This is my first stack overflow post so go easy on me, haha) I'm using: -OpenApi (v3) -L5-Swagger (wrapper of swagger-php & swagger-ui) I'm using annotations to generate an OpenAPI spec. The spec is being generated without errors from the console.…
2
votes
1 answer

Defining OpenApi response schemas - particularly the example field - with ServiceStack.Api.OpenApi

When I generate an API spec on SwaggerHub, I can declare the schemas, including user-friendly examples, as follows: components: schemas: Job: type: object required: - position - department - startDate …
Jeff Rosenberg
  • 3,522
  • 1
  • 18
  • 38
2
votes
1 answer

How to format a DELETE method in openapi 3.0.2?

I am having trouble figuring out a way to create a DELETE method for the POST method I just created in my API design. The post takes in a requestBody of the GlobalOrderSetupInfo, within that object there is another object that will be an array of…
user10463632
2
votes
2 answers

POST parameters not received Swagger3.0/OpenAPI

I'm coding a website using Swagger 3.0/OpenAPI to describe my APIs, and Node.js for the back-end. I successfully made the GET requests work but I'm having some trouble with all the POST requests. The problem is that the parameters I provide from an…
Mattia
  • 23
  • 1
  • 8