-
Notifications
You must be signed in to change notification settings - Fork 48
feat: add ability to select security in source key. #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d310c7c
feat: add ability to select security in source key.
075e5a7
chore: add auth_driver config.
e693c74
style: reformat code.
3d24e3c
chore: correct logic for security drivers.
55997cb
chore: add backward compatibility for security drivers.
29af4d6
style: correct code style.
f5e63da
style: correct switch style.
2873164
Merge branch 'master' into 97-add-custom-authentication-header-support
3fce8f9
test: add test case.
fe0bd78
test: add test case.
89e45f2
Update tests/SwaggerServiceTest.php
DenTray ba53bd1
Merge branch 'master' into 97-add-custom-authentication-header-support
0c2fcae
test: correct test case fixture.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
tests/fixtures/SwaggerServiceTest/tmp_data_request_with_empty_data_query.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "swagger": "2.0", | ||
| "host": "localhost", | ||
| "basePath": "\/", | ||
| "schemes": [], | ||
| "paths": [], | ||
| "definitions": [], | ||
| "info": { | ||
| "description": "This is automatically collected documentation", | ||
| "version": "0.0.0", | ||
| "title": "Name of Your Application", | ||
| "termsOfService": "", | ||
| "contact": { | ||
| "email": "your@mail.com" | ||
| } | ||
| }, | ||
| "securityDefinitions": { | ||
| "query": { | ||
| "type": "apiKey", | ||
| "name": "api_key", | ||
| "in": "query" | ||
| } | ||
| } | ||
| } |
110 changes: 110 additions & 0 deletions
110
tests/fixtures/SwaggerServiceTest/tmp_data_search_roles_request_query_security.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| { | ||
| "swagger": "2.0", | ||
| "host": "localhost", | ||
| "basePath": "/", | ||
| "schemes": [], | ||
| "paths": { | ||
| "/users/roles": { | ||
| "get": { | ||
| "tags": [ | ||
| "users" | ||
| ], | ||
| "consumes": [ | ||
| "application/json" | ||
| ], | ||
| "produces": [ | ||
| "application/json" | ||
| ], | ||
| "parameters": [ | ||
| { | ||
| "in": "query", | ||
| "name": "query", | ||
| "description": "string, required", | ||
| "type": "string", | ||
| "required": true | ||
| }, | ||
| { | ||
| "in": "query", | ||
| "name": "user_id", | ||
| "description": "integer, with_to_array_rule_string_name", | ||
| "type": "integer" | ||
| }, | ||
| { | ||
| "in": "query", | ||
| "name": "is_email_enabled", | ||
| "type": "string", | ||
| "description": "test_rule_without_to_string" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "Operation successfully done", | ||
| "schema": { | ||
| "example": [ | ||
| { | ||
| "id": 1, | ||
| "name": "admin", | ||
| "users": [ | ||
| { | ||
| "id": 1, | ||
| "name": "admin" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "id": 2, | ||
| "name": "client", | ||
| "users": [ | ||
| { | ||
| "id": 2, | ||
| "name": "first_client" | ||
| }, | ||
| { | ||
| "id": 3, | ||
| "name": "second_client" | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "$ref": "#/definitions/getUsersroles200ResponseObject" | ||
| } | ||
| } | ||
| }, | ||
| "security": [], | ||
| "description": "", | ||
| "summary": "test", | ||
| "deprecated": false | ||
| } | ||
| } | ||
| }, | ||
| "definitions": { | ||
| "getUsersroles200ResponseObject": { | ||
| "type": "array", | ||
| "properties": { | ||
| "items": { | ||
| "allOf": [ | ||
| { | ||
| "type": "array" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "info": { | ||
| "description": "This is automatically collected documentation", | ||
| "version": "0.0.0", | ||
| "title": "Name of Your Application", | ||
| "termsOfService": "", | ||
| "contact": { | ||
| "email": "your@email.com" | ||
| } | ||
| }, | ||
| "securityDefinitions": { | ||
| "query": { | ||
| "type": "apiKey", | ||
| "name": "authorization", | ||
| "in": "header" | ||
| } | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.