Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

setting security, causes errors. Omitting security makes our API docs less helpful. What to do?#993

LewisCowlesMotive started this conversation inGeneral
Discussion options

Hello 👋

We're transitioning from a Connexion 2 codebase to a FastAPI one, and this repo has helped us implement a middleware which enables request / response validation to continue against the spec so that we can continue to improve our API and know when things don't match our communicated contracts, for both requests and responses.

I recently picked up a file with no security entries. ReDocly rightly complained about this and the lack of servers nominated.

When I add them, we get errors from the middleware

{"errors":[        {"title":{"errors": [                    {"title":"Security not found. Schemes not valid for any requirement: [["token_auth"]]","status":403,"type":"<class"openapi_core.templating.security.exceptions.SecurityNotFound">"                    }                ]            },"status":400,"type":"<class 'openapi_core.validation.schemas.exceptions.InvalidSchemaValue'>"        }    ]}

I've tidied this up a bit, but it seems to me like I'd like to improve both our security and the OpenAPI separately.

We are nigh-on exactly the same ashttps://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/#describing-bearer-authentication

Someone tried to be clever and implement via typeapiKey; because we technically dont' use the Authorization header (too late to change now the API has existed with this "quirk" for a while.

Anyway, in the same way response checking is disabled, is it possible to disable the security and server checks?

You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

p1c2u
May 9, 2025
Maintainer

Hi@LewisCowlesMotive

There's no way for now however it should be fairly easy to implement it with configuration object in place.

You must be logged in to vote
2 replies
@LewisCowlesMotive
Comment options

Do you think you'd be open to a PR to add this to the configuration object in a similar way that response checking can be disabled (which is what I think we are calling a configuration object)

@LewisCowlesMotive
Comment options

I guess secondly, how "stable" can I expect the current test-suite unaltered to be?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
2 participants
@LewisCowlesMotive@p1c2u

[8]ページ先頭

©2009-2025 Movatter.jp