mirror of https://github.com/tiangolo/fastapi.git
APIKey scheme name default changed
This commit is contained in:
parent
a9e69a84cc
commit
2a48bb23c7
|
|
@ -43,9 +43,7 @@ openapi_schema = {
|
|||
}
|
||||
},
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"key": {"type": "apiKey", "name": "key", "in": "cookie"}
|
||||
}
|
||||
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "cookie"}}
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,9 +50,7 @@ openapi_schema = {
|
|||
}
|
||||
},
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"key": {"type": "apiKey", "name": "key", "in": "cookie"}
|
||||
}
|
||||
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "cookie"}}
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,9 +43,7 @@ openapi_schema = {
|
|||
}
|
||||
},
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"key": {"type": "apiKey", "name": "key", "in": "header"}
|
||||
}
|
||||
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "header"}}
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,9 +49,7 @@ openapi_schema = {
|
|||
}
|
||||
},
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"key": {"type": "apiKey", "name": "key", "in": "header"}
|
||||
}
|
||||
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "header"}}
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ def read_current_user(current_user: User = Depends(get_current_user)):
|
|||
|
||||
|
||||
@app.get("/another_key/users/me")
|
||||
def read_current_user_another_key(current_user: User = Depends(get_current_user_with_another_key)):
|
||||
def read_current_user_another_key(
|
||||
current_user: User = Depends(get_current_user_with_another_key),
|
||||
):
|
||||
return current_user
|
||||
|
||||
|
||||
|
|
@ -64,12 +66,12 @@ openapi_schema = {
|
|||
"operationId": "read_current_user_another_key_another_key_users_me_get",
|
||||
"security": [{"another_key": []}],
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"key": {"type": "apiKey", "name": "key", "in": "header"},
|
||||
"another_key": {"type": "apiKey", "name": "another_key", "in": "header"}
|
||||
"another_key": {"type": "apiKey", "name": "another_key", "in": "header"},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,9 +43,7 @@ openapi_schema = {
|
|||
}
|
||||
},
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"key": {"type": "apiKey", "name": "key", "in": "query"}
|
||||
}
|
||||
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "query"}}
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,9 +49,7 @@ openapi_schema = {
|
|||
}
|
||||
},
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"key": {"type": "apiKey", "name": "key", "in": "query"}
|
||||
}
|
||||
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "query"}}
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ def test_post_file(tmp_path):
|
|||
|
||||
|
||||
def test_post_large_file(tmp_path):
|
||||
default_pydantic_max_size = 2 ** 16
|
||||
default_pydantic_max_size = 2**16
|
||||
path = tmp_path / "test.txt"
|
||||
path.write_bytes(b"x" * (default_pydantic_max_size + 1))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue