Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jeremy Whitlock
    @whitlockjc
    What is this "output" you speak of?
    lenkaswarna
    @lenkaswarna
    i am getting output as {"info":{"title":"Node Swagger API","version":"1.0.0","description":"Demonstrating how to desribe a RESTful API with Swagger"},"host":"localhost:3000","basePath":"/","swagger":"2.0","paths":{},"definitions":{},"responses":{},"parameters":{},"securityDefinitions":{}}.
    But my expected output is {"info":{"title":"Node Swagger API","version":"1.0.0","description":"Demonstrating how to desribe a RESTful API with Swagger"},"host":"localhost:3000","basePath":"/","swagger":"2.0","paths":{"/api/doctorGet":{"get":{"tags":["Doctors"],"description":"Returns all doctors","produces":["application/json"],"responses":{"200":{"description":"An array of doctors","schema":{"$ref":"#/definitions/Doctor"}}}}},"/api/doctorPost":{"post":{"tags":["Doctors"],"description":"Creates a new doctor","produces":["application/json"],"parameters":[{"name":"doctor","description":"Doctor object","in":"body","required":true,"schema":{"$ref":"#/definitions/Doctor"}}],"responses":{"200":{"description":"Successfully created"}}}},"/api/doctorEdit/{id}":{"put":{"tags":["Doctors"],"description":"Updates a single doctor","produces":["application/json"],"parameters":[{"name":"id","description":"Doctor's id","in":"path","required":true,"type":"integer"},{"name":"doctor","description":"Doctor object","in":"body","required":true,"schema":{"$ref":"#/definitions/Doctor"}}],"responses":{"200":{"description":"Successfully updated"}}}},"/doctorDelete/{id}":{"delete":{"tags":["Doctor"],"description":"Deletes a single doctor","produces":["application/json"],"parameters":[{"name":"id","description":"Doctor's id","in":"path","required":true,"type":"integer"}],"responses":{"200":{"description":"Successfully deleted"}}}}},"definitions":{"Doctor":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"picUrl":{"type":"string"},"regNo":{"type":"string"},"briefDescription":{"type":"string"},"contact":{"type":"string"},"status":{"type":"string"},"waitingTime":{"type":"integer"},"rating":{"type":"integer"},"videoUrl":{"type":"string"},"appearUrl":{"type":"string"},"thumbnailUrl":{"type":"string"},"lastUpdatedTime":{"type":"string"}}}},"responses":{},"parameters":{},"securityDefinitions":{}}
    Jeremy Whitlock
    @whitlockjc
    The information you providing seems to be partial, as in there is not enough information to even wager a guess as to what is going on.
    ekiyanov
    @ekiyanov
    OMG… one message a week..
    Jeremy Whitlock
    @whitlockjc
    Huh?
    lenkaswarna
    @lenkaswarna
    Thanks Jeremy for your response ,i solved that issue.
    Andrea Falzetti
    @rexromae_twitter
    Hi guys, does anyone know when the swagger-codegen will support OAS3?
    jeremyvergnas
    @jeremyvergnas
    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
    @Chaz6
    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
    @miqui
    hi folks, is there a package/cli/tool that will allow me to validate a api response against the a swagger 2.0 spec?
    jasmine-k
    @jasmine-k
    Hi everyone, is there a way to validate API response against specs and automate the same.
    elion
    @elion

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

    I did some search and found this approach:
    https://stackoverflow.com/questions/30217910/generate-pdf-from-swagger-api-documentation#answer-41257222

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

    Jeremy Whitlock
    @whitlockjc
    @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
    @miqui
    @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
    @dimberman
    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?
    jasmine-k
    @jasmine-k
    @whitlockjc Thanks for the help. I will look into that.
    alancnet
    @alancnet
    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)
    ajqportal
    @ajqportal
    Hi
    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
    @MohamedHajr
    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
    @MelnikovIG
    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>
    Meldiron
    @Meldiron
    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:
    image.png
    Jeremy Whitlock
    @whitlockjc
    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
    @iamwhitebox
    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
    @whitlockjc
    If ES6 is compatible with ES5 Node.js modules, I don't see why not. Got an example?
    AlexCppns
    @AlexCppns
    Hello
    I was wondering if any of you know a tool like https://stoplight.io/platform/prism/ that s open-source?
    namratapanchal
    @namratapanchal
    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
    @rosario
    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
    @lixujia
    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
    @InTheCloudDan
    Does anyone happen to have an example modeling something like an AWS IAM resource using swagger v2?
    Paulius Subačius
    @pausbc
    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
    @rakeshtechguy_gitlab

    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.
        app.UseSwagger();
        // 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
    sancroth
    @sancroth
    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.
    eg.
    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.