Newest swagger Questions

Q&A for professional and enthusiast programmers

Generating files to multiple paths with Swagger Codegen?

I'm creating a template for our server-side codegen implementation, but I ran into an issue for a feature request... The developers who are going to use the generated base want the following pattern (...

How to get Swagger UI to work based on documentation guide? (even the example)

I am trying to use Swagger UI to document our node.js API, so I went to http://swagger.io/docs/, down to Swagger UI Documentation -> Usage, to find this Now, this is not the only place that provides ...

Swagger ApiParam Annotation's allowableValues issue

@ApiParam(name="relation", value = "Reln Types", allowableValues= "A B,B C")@RequestParam(value = "relation" , required = false) String relation I use this in Java api but when the dropdown box is ...

Swagger 1.5 not generating valid JSON description

I am trying to make swagger document my API composed of Jersey-spring 2.22.2 with Spring 4.3 and Jackson 2.22.2. The swagger package I'm using is: <dependency> <groupId>io....

validatorUrl : null NOT WORKING in Swagger

I am trying to disable the online validator error from swagger. I used validatorUrl : null But it is not working and i am still getting the error at the bottom of the page. On clicking of the ...

Swagger-ui problems trying to use a object parameter containing a array

Seem to almost have it... Trying to have swagger send an anonymous hash of parameters in the request body. I have an anonymous hash containing one key named list that contains an array. Trying to ...

Springfox integration with jackson

import javax.validation.constraints.Size; class User { @Size(min = 3) private String name; private String email; @JsonCreator public User(@JsonProperty(value = "name", required =...

Swagger POST request not working after AUTH

I created swagger documentation for one of our APIs which was nicely working until hitting a major roadblock with Basic Auth on all of the POST requests. After adding the security section and ...

Update Swagger during runtime

In my internship we are developing an API for a website to control various products. Each product has a so called connector that exposes the different endpoints that can be used for that product. ...

Cannot find type name in schema definitions

I've started using Swashbuckle with Web API. None of my types are getting rendered correctly in my Swagger UI. On every method, I see something like this (unrendered): <span class="strong">...

Jersey server, rest api : How to remove the code and type from the response body?

I'm trying to create a Rest Api using Jax-rs Jersey from a base code generated by swagger. The specifications are for exemple for a specific Request : Code : 200 Description : User token for login ...

why swagger-maven-plugin changed my output to “application/xhtml+xml”?

I am new to swagger-maven-plugin and I added it to pom.xml, the swagger.json was generated but all my REST api is not working anymore I found that in the response header "content type" was changed ...

Swagger: Add description with ref

I want to add a description to an object property that his definition is referenced. Something like that: newCreditCard: type: object properties: billingPhone: ...

SWAGGER Post XML JSON compatibility

I'm trying to create an API for JSON and XML using SWAGGER's automatic code generation but when i do a POST i have problems with XML (415 unsupported support type or 400 bad request, but the Content-...

How to access the api docs with swagger

I have followed the same exact steps from this doc http://mikelynchgames.com/software-development/adding-swagger-to-your-dropwizard-application/ How do I access the doc I've written for the resources....

Can't load .Net Core Web API Assembly in NSwagStudio

I seem to have a problem loading .Net Core Web API assembly in NSwagStudio. I have a reference package (NuGet) for 'Microsoft.AspNetCore.Mvc (1.1.2)' in my project but this seems to break the load ...

cannot connect to the server stub using java client

I recently joined a project.I am a beginner. My responsibility is to create server stub, create SDK and create a java client using SDk and communicate with server stub. I created server stub using, ...

Django REST Swagger: Some properties are missing from swagger documentation

I have the following class in my serializers.py: class RecordSerializer(ModelSerializer): class Meta: model = Record fields = ('uuid', 'code', 'name', 'group_name', 'is_active') ...

flasgger exposing api on other address [on hold]

Hi I have used flasgger to generate my documentation. It is so easy and I am able to get documentation at http://localhost:5000/apidocs/index.html but instead of localhost I tried to type my ip ...

How would I create a swagger doc file based on yaml

I have a json: { "client": [ { "id": 1, "name": "Mike", "last_name": "Hi", "email": mike.hi@gmail.com" } ] } I want to create a swagger doc to be able to generate the client and server with ...

Returning data from API calls auto-generated by lb swagger

I followed this tutorial on generating an API with loopback from a swagger definition file. I realize this tutorial is very old. I have NOT been able to find any more recent tutorials. I have a model ...

No “Try it out” button for HEAD method in Swagger UI

I have a Swagger spec that defines a HEAD operation: head: description: show flight exist or not. parameters: - name: flight_no in: path type: string description: Flight_no ...

Tools/Services for documenting of API written on .Net (C#) [closed]

I've done investigations on selecting a tool that can help us to create a beautiful documentation for our API. That's requirements we want to have: 1) user-friendly interface (till drag&drop ...

custom index.html with Swashbuckle

i'm trying to use Swashbuckle Swagger and i want to use this custom UI theme: https://github.com/omnifone/slate-swagger-ui I added it to my Content folder, fix scripts/css link load with: c....

Mark a method anonymous: swagger version 3.0.2

I am using Swagger-ui version 3.0.2, I have hosted it locally and provided it my Json file and API it opens the document fine and lists all the method in the json file, after i put basic ...

Django REST Swagger: How to add oauth2/token endpoint

I'm using django-rest-swagger version 2.1.1. I used the oauth2_provider.urls to build the oauth2/token endpoint like this: urlpatterns = [ url(r'^oauth2/', include('oauth2_provider.urls', ...

angular2 forms: using json and json schema

I'm looking for a solution to edit a server-side json file. My preference would be an Angular2 web form generated using a JSON schema to edit the JSON file. Another option would be to integrate ...

Swashbuckle <summary> alternative

Lets say I have the following Method: /// <summary> /// Just a Method /// </summary> [HttpGet()] [Produces("plain/text")] public IActionResult Foo() => this.Ok("Some Data.."); Swagger ...

Swagger POST/PUT body parameters not passing to my controller

My simple swagger API documentation. parameters not passing to my controller while performing post and put operations.(Get and Delete operations performs fine) Swaggerjson file: "paths": { ...

API methods Sorting : Swagger version 3.0.2

I am using swagger version 3.0.2 , I have also followed this answer but there was no effect on the method order. window.onload = function() { const ui = SwaggerUIBundle({ ..... apisSorter: "...

Error in setting up swagger in expressjs project

I have followed [this][1] link to add swagger to my existing project. I encountered the following error while setting up swagger. Any leads will be highly appreciated. :xxx\node_modules\swagger-...

Play Swagger - custom class in dataType

I'm setting up the documentation of my Play! Framework Scala API and I have issues declaring for my model a parameter of a custom class. I have an Address.scala file with like : @ApiModel case class ...

Swagger UI model rendering issue in WSO2

Swagger UI in a WSO2 application renders model schemas in the Model tab incorrectly. Currently it shows the HTML markup as is: It is supposed to look like this: I would really appreciate if someone ...

Swagger recursive definition is rendered as “undefined” in Swagger Editor

I am using http://editor.swagger.io minimal.yaml example to define a MenuItem which has submenuitem property of type array recursively referencing MenuItem. But I get submenuitem as undefined. Any ...

Ignore service implementation file while executing swagger code gen

I am new to swagger. I am trying to implement my rest services using jersy and documentation using swagger. Once model is generated using code gen and added logic in my service implementation class. ...

SwashBuckle define Response Body on Error

My application is an ASP.NET Core 1.0 Web API. I have the following Controller: [HttpGet("{someData:MinLength(5):MaxLength(5)}")] [Produces("application/json")] public async Task<...

Resource specific API documentation in swagger

I'm evaluating options for API documentation. In general, I really like swagger, however, I'm not sure if it's possible to fit into my (quite specific) needs. Suppose that I've got only one endpoint ...

Array title not showing up in Swagger UI Models

I have a Response object and an array of Response objects with "title": "Responses". But Responses title text is not showing up in Models section of Swagger UI. Is this expected or something wrong ...

Spring Boot + SWagger UI changing port

I integrated Spring Boot with Swagger (spring fox) but it runs on 8080 port and my application is running on different port. How can I access Swagger UI on my application port?

How to override content defined in Remarks tag for a Swagger output

In my sources I define some documentation data within remark tags, so they show in the api Swagger pages in the corresponding header section. Is there a way to fill that header section ...

How to call API for authenticate user in swagger

I've created some API for my application, all the APIs are for the authenticate user except one which is used to make user authenticate. I am maintaining all the APIs in swagger. Everything working ...

Can Swagger have different security for different tags?

Can Swagger have different security for different tags? I can't find the setting for tag's security in the Swagger Specification. I hope the same tag will own the same security, and different tags ...

Swagger doesnt show inherited objects

I have a class "SubModel" which inherits from class "SuperModel". My REST request returns an object of one of these classes. Now i want to document that in my Swagger UI that either an object of ...

How to customize swagger codegen to generate models that ignore null values

I'm using swagger-codgen to generate java model classes for my spring boot application and serialize them as json. By default these models would all include optional properties with null values. I ...

Sending Complete Response of a REST service as Input to another REST service in SOAP UI

We have a requirement on validating the REST schema defintions. We have a REST service endpoint R1 that returns a json schema as the response when GET call is performed. We need to send that entire ...

How to use jaxrs-analyzer standalone to create swagger specific documents?

My project is creating different jar files. These are located in different locations. I need to run jaxrs-analyzer.jar to generate my swagger.json file. How can I give multiple jar location to the ...

Cloudflare API machine-readable format

I'm trying to develop a C# client for the CloudFlare API (in particular the Zone API) since I couldn't find any package that was current. To jumpstart development I was wondering if CloudFlare ...

How to exclude property from swagger definition

I'm using Swagger online editor. I create some model in definition Object: type: object properties: id: type: integer format: int32 name: type: string ...

Convert Swagger Java Object into JSON/YAML

I need to read, modify and re-generate a JSON/YAML swagger file documentation. I have deserialized a JSON file with Swagger Parser and I have a Swagger Java Object with the original JSON data mapped ...

Generate interactive API docs from Tornado web server code

I have a Tornado web server that exposes some endpoints in its API. I want to be able to document my handlers (endpoints) in-code, including description, parameters, example, response structure, etc., ...
Translating... 0%