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

How to add attributes to Controller methods in ASP.NET Core to generate OpenAPI Extensions

I wish to generate OpenAPI Document using NSwag for my ASP.NET Controller methods, but with custom OpenAPI Extensions. Example: Here's a part of my OpenAPI spec. I want to mention SLA of each path: /v1/address/verifyAddress: put: …
Anas S
  • 43
  • 1
  • 9
2
votes
1 answer

An array of images is being sent through the parameters instead of formData, how to change this?

When I execute a call in the OpenAPI specification it puts an array of files in the parameters section instead of the formData. This way it gets read as a string instead of an array. I've tried to do the same request in Postman. In Postman the call…
2
votes
2 answers

Failed to deploy Cloud Endpoint with OpenApi

I have Python 2.7 API server using Google Cloud Endpoints framework. I follow the example from GitHub and code my service and configurations as explained in the documentation. When I'm trying to deploy the endpoint using gcloud endpoints services…
2
votes
1 answer

How can I include JSON body API examples in Swagger2Markup API requirements (when converting from Swagger YAML)?

I've used the Swagger editor (editor.swagger.io) to create API requirements that look great online in a web browser, but I want to convert this Swagger YAML documentation into a format that can be printed (Word, PDF, Excel, HTML) and read…
Sammy Cakes
  • 162
  • 2
  • 11
2
votes
1 answer

OpenAPI parameter with brackets and variable name

I am working on an API which allows searching with URLs like: GET https://example.com/api/data?search[field1]=value1 GET https://example.com/api/data?search[field2]=value2 GET…
worpet
  • 3,788
  • 2
  • 31
  • 53
2
votes
1 answer

How to disable the try it function in the Azure API management developer portal?

On the Azure API management developer portal, there is a "Try it" feature to test api request in your browser. The try it button: Is it possible to disable/remove this feature? I don't want developers to be able to post test data inside our…
2
votes
1 answer

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

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.
srnjak
  • 915
  • 7
  • 21
2
votes
2 answers

Validating a CRD with an embedded core.v1.PodSpec

I'm developing a controller with a CRD. The CRD includes our custom stuff along with an embedded core.v1.PodSpec. (v1.13.1) I define a validation section in the CRD that can validate and enforce constraints on our custom fields but I can't figure…
user11471017
2
votes
0 answers

Does swagger (OpenAPI) support declaring types that are sub types of String or other primatives

In my API a UUID is not returned as its internal model instead it is returned as a string. This means if we have a UUID in the API it looks like "uuid" rather than: {id: "uuid"} Currently I tell springfox that UUID is a String, however this…
Luke
  • 884
  • 8
  • 21
2
votes
1 answer

How to import a component from another OpenAPI file?

Can you import a component that is defined in an other OpenAPI file? Suppose I have two openAPI files: openAPI.yaml and otherOpenAPI.yaml. In openAPI.yml I want to use the myItem component that is defined in otherOpenAPI.yaml Can I do something in…
xtra
  • 1,957
  • 4
  • 22
  • 40
2
votes
2 answers

"Request body" doesn't appears on Swagger UI

I'm trying to do a test with a POST request on my Swagger Documentation, but I'm having the following trouble: On Swagger Editor I can test it normally, but on Swagger UI the Request body field doesn't appears, so I can't put my email and password…
Gabriel Borges
  • 63
  • 1
  • 1
  • 9
2
votes
1 answer

Swagger-Codegen from within the .NET application

I need to generate client libraries from Swagger JSON in different languages (Javascript in my case) from within the code of my .NET application. I tried to send POST request to swagger online codegen but it's not very reliable method to retrieve an…
Greg
  • 21
  • 3
2
votes
1 answer

Include XML Comments for enums in Swagger and ReDoc based OpenAPI documentation

We have enums in our ASP.NET Core 2.2 project, commented on, like these: /// Theme for the UI public enum Theme { /// Dark backgrounds, lighter texts Dark, /// Light backgrounds with dark…
Jeroen
  • 60,696
  • 40
  • 206
  • 339
2
votes
0 answers

Routing fails with multiple server URLs

I have deployed a web service using Connexion and OpenAPI 3.0. I run it locally for debugging testing, and deploy it to a production server subsequently. I am struggling with how to specify the server URLs properly in the OpenAPI file. All works as…
Carsten
  • 1,912
  • 1
  • 28
  • 55
2
votes
0 answers

OPEN API 3.0 Extend an in query parameter into paths section

It's possible to define a parameter into the parameters section, under components section into an OPEN API sheet. At the same time it's possible to reference that parameter into a path, under the responses section. What I want to do, it's E.G.…
Michele Carino
  • 1,043
  • 2
  • 11
  • 25