oatpp / oatpp-swagger

OpenApi 3.0.0 docs + Swagger UI for oatpp services
https://oatpp.io/
Apache License 2.0
94 stars 53 forks source link

swagger-ui authorize bug #75

Open Naamanly opened 1 year ago

Naamanly commented 1 year ago

Swagger-ui clicks the Authorize button, and the pop-up panel has no input box for entering credentials.

image Below is the component registration code.

OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::swagger::DocumentInfo>, swaggerDocumentInfo)([] {
        auto ss = oatpp::swagger::SecurityScheme::createShared();
        ss->description = "Default HTTP Bearer Authorization";
        ss->name = "Authorization";
        ss->in = "header";
        ss->type = "http";
        ss->scheme = "Bearer ";
        ss->bearerFormat = "JWT";
        oatpp::swagger::DocumentInfo::Builder builder;
        builder
            .setTitle(" API interface service")
            .setDescription("Provide a set of API documents for describing the front-end and back-end interactions of the project")
            .setVersion("1.0.0")
            .setContactName("example")
            .setLicenseName("Apache License, Version 2.0")
            .setLicenseUrl("https://www.apache.org/licenses/LICENSE-2.0")
            .addSecurityScheme("bearer_auth", ss);
        return builder.build();
        }());
adityahagawane commented 2 months ago

Did you solve this issue i get same issue for authorization