APIKey scheme name default changed

This commit is contained in:
bilalAlpaslan 2022-04-13 01:41:56 +03:00
parent a9e69a84cc
commit 2a48bb23c7
8 changed files with 12 additions and 22 deletions

View File

@ -43,9 +43,7 @@ openapi_schema = {
}
},
"components": {
"securitySchemes": {
"key": {"type": "apiKey", "name": "key", "in": "cookie"}
}
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "cookie"}}
},
}

View File

@ -50,9 +50,7 @@ openapi_schema = {
}
},
"components": {
"securitySchemes": {
"key": {"type": "apiKey", "name": "key", "in": "cookie"}
}
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "cookie"}}
},
}

View File

@ -43,9 +43,7 @@ openapi_schema = {
}
},
"components": {
"securitySchemes": {
"key": {"type": "apiKey", "name": "key", "in": "header"}
}
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "header"}}
},
}

View File

@ -49,9 +49,7 @@ openapi_schema = {
}
},
"components": {
"securitySchemes": {
"key": {"type": "apiKey", "name": "key", "in": "header"}
}
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "header"}}
},
}

View File

@ -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"},
}
},
}

View File

@ -43,9 +43,7 @@ openapi_schema = {
}
},
"components": {
"securitySchemes": {
"key": {"type": "apiKey", "name": "key", "in": "query"}
}
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "query"}}
},
}

View File

@ -49,9 +49,7 @@ openapi_schema = {
}
},
"components": {
"securitySchemes": {
"key": {"type": "apiKey", "name": "key", "in": "query"}
}
"securitySchemes": {"key": {"type": "apiKey", "name": "key", "in": "query"}}
},
}

View File

@ -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))