Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    OMG… one message a week..
    Jeremy Whitlock
    Thanks Jeremy for your response ,i solved that issue.
    Andrea Falzetti
    Hi guys, does anyone know when the swagger-codegen will support OAS3?
    Hey guys, don’t know whether I am on the good room for this question.
    I am playing with swagger-jsdoc to generate APIs documentation. I was wonderring whether it is possible to declare my definitions in a separate .yaml file and make sure they are part of the generated documentation eventually.
    I know it is possible by just declaring the definitions in a comment block with the keyword @swagger, but not sure it is possible with a .yaml file
    Chris Hills
    Are there any communities around building swagger specs for common business use cases? I have one in mind, fleet vehicle suppliers and fleet vehicle customers.
    Miguel Quintero
    hi folks, is there a package/cli/tool that will allow me to validate a api response against the a swagger 2.0 spec?
    Hi everyone, is there a way to validate API response against specs and automate the same.

    Hi! Could anyone recommend solutions to generate PDF from swagger API specification?

    I did some search and found this approach:

    It would be nice to have "Save as PDF" function in Swagger editor.

    Jeremy Whitlock
    @elion This has nothing to do with swagger-tools.
    @jasmine-k swagger-tools has an API but it's not great. I'd suggest sway.
    @miqui swagger-tools has that. There is also a sway-based one but it's not been updated a lot: https://github.com/whitlockjc/swagger-lint
    Miguel Quintero
    @whitlockjc - looking at your project - whitlockjc/swagger-lint#12
    @Chaz6 - not that i know of, i always check apis.guru to get ideas on other APIs
    Daniel Imberman
    Hi all, I'm attempting to use the Swagger editor but every time I generate a client from one of the examples it just says "something bad happened"
    has anyone here gotten around that?
    @whitlockjc Thanks for the help. I will look into that.
    Hi, I'm just getting started with Swagger. I spent the last few days building a YAML in Editor around an API a colleague has already written in Restify. How do I add swagger-ui to my Restify app so that it serves up what the editor previews?
    The obvious LMGTFY answer is swagger-restify, but it asks for a parameter: "swaggerUI -> Where is your swagger-ui?" which in the example points to what seems like Swagger UI either checked into the repo (which I don't think is a good practice), or previously automatically generated (which I don't know how to do)
    Got issue on asp.net core seems like Authorization on bearer not working at all?
    here is my code:
    swagg.AddSecurityDefinition("Bearer", new ApiKeyScheme
                        Description = "Desc here",
                        Name = "Authorization",
                        In = "header",
                        Type = "apiKey"
    Mohamed Hajr
    Hi, I'm trying to seprate the connect http app that uses swagger tools initializeMiddleware function to to add middlewares to the app but the thing is that it is async and I need to make sure that the all the middlewares are intialized beofre I export the app to use it for testing
    @whitlockjc i checked this thread apigee-127/swagger-tools#495 thread already and it seems that there no way to make sure that all the middlewares are intialized before exporting the app, I'm just wondering now if i want to write integration tests using supertest, I need a seprate app module that has the the http server app alone wether express or connect or any
    Igor Melnikov
    Hey, anyone has example how to generate generic types using swagger json? for example if i have ItemsCollection<T> class in C# and return ItemsCollection<Country> from my API, generated models in typescript generated as ItemsCollectionCountry instead of generic type ItemsCollection<T>
    Hi guys, I have a route (using swagger) /pet/{petId} where petId has to be integer. when I send some string insteand of integer I expect some intelligent json error, insteand I get this:
    Jeremy Whitlock
    How much more intelligent do you need it? petId is expected to be an integer, you passed in a non-integer (a) and you're told not only is that an invalid value but the criteria to make it so.
    "is not a valid integer" seems pretty specific.
    @Meldiron ^^^
    Jeff Voss
    Does swagger-tools work with es6 module definition?
    I cannot seem to use this with module exported like export default module_name
    x-swagger-router-controller does not link up to module
    Jeremy Whitlock
    If ES6 is compatible with ES5 Node.js modules, I don't see why not. Got an example?
    I was wondering if any of you know a tool like https://stoplight.io/platform/prism/ that s open-source?
    Hello, I am new to swagger and Open API specification, would like to know if there is any solution to this issue. thanks OAI/OpenAPI-Specification#1656
    Rosario Rascuna
    Hi everyone, I'm running gulp but there are few unit tests failing, specifically in test/2.0/test-spec.js the step for it('missing required value', function (done) {, any idea why?
    I checkout the tag v0.10.4
    Johnny Lee
    Hello, everyone. I'm writing a Restful API document. There are lot's of API that return pagination results. For example: {"count": 1024, "next": null, "previous": null, "results": [.....]}, what in the "result" array are my really definitions.
    Can I define the pagination information and reuse it for multiple APIs?
    Dan O'Brien
    Does anyone happen to have an example modeling something like an AWS IAM resource using swagger v2?
    Paulius Subačius
    Hello, is there a way to configure swagger code gen so that it would generate list properties as List<String> foo = new ArrayList<>(); instead of List<String> foo = null;?
    Rakesh Bairi

    We have been trying to achieve configuring Swagger on Aspnet Core Identity Server 4 Application, we have added Custom End points to ID4 refered from link.

    Swagger Configuration:

    Code added on Startup.cs > ConfigureServices(IServiceCollection services)

    services.AddSwaggerGen(c =>
    c.SwaggerDoc("v1", new OpenApiInfo { Title = "Identity Server Application", Version = "v1" });
    Code added on Startup.cs > Configure(IApplicationBuilder app)

      // Enable middleware to serve generated Swagger as a JSON endpoint.
        // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.),
        // specifying the Swagger JSON endpoint.
        app.UseSwaggerUI(c =>
            c.SwaggerEndpoint("/swagger/v1/swagger.json", "Identity Server Application");

    When i run application swagger/index.html only showing Custom Added End Points,its not showing Identity Server Endpoints like {connect/authorize,connect/token,connect/userinfo etc.}

    is there way to achieve above functionality.

    can any one give me right direction to achieve above functionality
    Hello guys. I got a quick question. I am using go-swagger to generate my swagger.json and render it with both ReDoc and SwaggerUI.
    I wante to achieve what i see on the left side of https://redocly.github.io/redoc/#tag/user , which means categories with models underneath them.
    General > pet, store
    User Management > user
    I am using OpenAPI 2.0 specifications but i can only get it to show pet,store,user and not split them in categories.
    Hi, I have a query regarding Swagger UI. I need the response of the requested URL in different languages like the postman does. It provides the code in different languages like ruby, python, PHP, nodejs etc. Is it possible to achieve this using swagger UI?
    Jonas Jermann
    I'm trying to generate client code for a given openapi.json file, how do I do that?
    it's client code for c# net6.0
    ideally I want to add the nuget package for dotnet core swagger-gen and then somehow make sure the code is generated. But all the examples I found are about not about that part but instead about how to get the openapi file or the swagger ui, I'm interested how I can create client code from an openapi.json.