Skip to main content
Filter by
Sorted by
Tagged with
152 votes
12 answers
334k views

How can I export a Swagger definition file? It should be a JSON or YAML file, e.g. swagger.json or swagger.yaml. Let's say I have an endpoint looking like http://example.com//swagger/ui/index#!: The ...
sashoalm's user avatar
  • 80.5k
10 votes
1 answer
5k views

Note: This question is different from the one here, in that I need it to work with Swagger. Given a FastAPI GET endpoint, I want to allow any arbitrary set of URL parameters, while maintaining Swagger ...
SteveJ's user avatar
  • 3,343
103 votes
25 answers
171k views

I'm using Swashbuckle to generate swagger documentation\UI for a webapi2 project. Our models are shared with some legacy interfaces so there are a couple of properties I want to ignore on the models. ...
mutex's user avatar
  • 7,746
140 votes
16 answers
309k views

My project has Spring Security. Main issue: Not able to access swagger URL at http://localhost:8080/api/v2/api-docs. It says Missing or invalid Authorization header. Screenshot of the browser window ...
shubhendu_shekhar's user avatar
98 votes
4 answers
129k views

In my "simplified" API, all responses are derived (inherit) from a base "response" class. The response class is composed of a header filled with metadata, and the body which contains the core data the ...
Programster's user avatar
26 votes
2 answers
52k views

I am defining an API specification in SwaggerHub using OpenAPI 2.0. The /contacts request returns an array of contacts. The definition is below: /contacts: get: tags: - contacts ...
Krishna Adhikari's user avatar
39 votes
1 answer
34k views

I'm trying to build a Swagger model for a time interval, using a simple string to store the time (I know that there is also datetime): definitions: Time: type: string description: Time in ...
mvc's user avatar
  • 743
58 votes
4 answers
50k views

I have a series of parameters in Swagger like this "parameters": [ { "name": "username", "description": "Fetch ...
lorless's user avatar
  • 4,568
112 votes
2 answers
76k views

Let's say I've got a parameter like limit. This one gets used all over the place and it's a pain to have to change it everywhere if I need to update it: parameters: - name: limit in: query ...
brandonscript's user avatar
15 votes
1 answer
15k views

I trying to map the following JSON to an OpenAPI 2.0 (Swagger 2.0) YAML definition, and I am not sure how to set mixed array types into my schema: { "obj1": [ "string data", ...
Rjk's user avatar
  • 1,484
11 votes
1 answer
19k views

In the frontend, I have the following JS function: export const uploadFormData = async ( token: string, email: string, formInfo: Array<Object>, ): Promise<any> => { ...
benjammin's user avatar
  • 203
189 votes
8 answers
389k views

I am trying to convey that the authentication/security scheme requires setting a header as follows: Authorization: Bearer <token> This is what I have based on the swagger documentation: ...
Elmer Thomas's user avatar
  • 2,258
28 votes
2 answers
29k views

Is there any way to document the following query? GET api/v1/users?name1=value1&name2=value where the query parameter names are dynamic and will be received from the client. I'm using the latest ...
Sharad Ahire's user avatar
178 votes
6 answers
393k views

What is the correct way to declare a date in a swagger-file object? I would think it is: startDate: type: string description: Start date example: "2017-01-01" format: date ...
Patrick Savalle's user avatar
17 votes
3 answers
29k views

I am using Swagger OpenAPI Specification tool. I have a string array property in one of the definitions as follows: cities: type: array items: type: string example: "Pune"...
Prashant's user avatar
  • 4,702
88 votes
3 answers
106k views

I have a ReSTFul API written in simple Spring (no Spring Boot, no fancy stuff!). I need to implement Swagger into this. So far, EVERY page on the internet has only driven me crazy with confusing ...
wavicle's user avatar
  • 1,304
59 votes
4 answers
137k views

I need to document with Swagger an API that uses, both as input and output, maps of objects, indexed by string keys. Example: { "a_property": { "foo": { "property_1": "a ...
Xavier Lamorlette's user avatar
89 votes
2 answers
109k views

I would like to format my Swagger API descriptions so that they are not simple paragraphs of text. Preferably, I'd like to add a small table to it. I did not find an online reference about text ...
TERACytE's user avatar
  • 7,903
46 votes
5 answers
43k views

I'm preparing my API documentation by doing it per hand and not auto generated. There I have headers that should be sent to all APIs and don't know if it is possible to define parameters globally for ...
mohamnag's user avatar
  • 2,912
31 votes
1 answer
31k views

The API I'm trying to describe has a structure where the root object can contain an arbitrary number of child objects (properties that are themselves objects). The "key", or property in the ...
user2152081's user avatar
24 votes
4 answers
58k views

I'm building a fuzzer for a REST API that has an OpenAPI (Swagger) definition. I want to test all available path from the OpenAPI definition, generate data to test the servers, analyse responses code ...
Youssouf Maiga's user avatar
11 votes
5 answers
34k views

I'm trying to develop an automated testing suite for a REST API. I've been told that Swagger would be the right tool to use to do this. The API is being developed using the Spring Framework. I can't ...
illm's user avatar
  • 197
1 vote
2 answers
9k views

I have a problem about opening swagger ui in my Spring Boot Example. I get this kind of error when I access to localhost:8080/swagger-ui or localhost:8080/root-api-name:swagger-ui Securing GET /...
Sercan Noyan Germiyanoğlu's user avatar
48 votes
8 answers
89k views

I want to combine an API specification written using the OpenAPI 3 spec, that is currently divided into multiple files that reference each other using $ref. How can I do that?
heitortsergent's user avatar
29 votes
2 answers
18k views

I need to know if it's possible to set up custom operationid, or a naming convention, I mean I know that operation filter can be overwritten the way how operationId is generated https://azure....
SilentTremor's user avatar
  • 4,962

1
2 3 4 5
26