-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(security): add support for OAS securitySchemes (http & apiKey)
- Loading branch information
Showing
14 changed files
with
954 additions
and
77 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"swagger": "2.0", | ||
"servers": [{ | ||
"url": "foo" | ||
}], | ||
"info": { | ||
"description": "VFE API", | ||
"version": "1.0.0", | ||
|
This file contains 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 |
---|---|---|
|
@@ -118,9 +118,6 @@ | |
}, | ||
"id_2": { | ||
"value": "2" | ||
}, | ||
"badParam": { | ||
"value": "wrong-param" | ||
} | ||
} | ||
} | ||
|
This file contains 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,183 @@ | ||
{ | ||
"openapi": "3.0.0", | ||
"info": { | ||
"description": "Fake Online REST API for Testing and Prototyping", | ||
"version": "1.0.0", | ||
"title": "JSON Placeholder" | ||
}, | ||
"tags": [ | ||
{ | ||
"name": "posts" | ||
} | ||
], | ||
"servers": [ | ||
{ | ||
"url": "https://jsonplaceholder.typicode.com" | ||
} | ||
], | ||
"paths": { | ||
"/posts": { | ||
"get": { | ||
"tags": [ | ||
"posts" | ||
], | ||
"summary": "Get all available posts", | ||
"parameters": [ | ||
{ | ||
"name": "id", | ||
"in": "query", | ||
"description": "Filter by post ID", | ||
"required": false, | ||
"schema": { | ||
"type": "integer" | ||
} | ||
}, | ||
{ | ||
"name": "userId", | ||
"in": "query", | ||
"description": "Filter by user ID", | ||
"required": false, | ||
"schema": { | ||
"type": "string" | ||
}, | ||
"examples": { | ||
"products": { | ||
"value": "products" | ||
}, | ||
"service": { | ||
"value": "services" | ||
}, | ||
"eligibility-enterprise": { | ||
"value": "eligibility" | ||
}, | ||
"eligibility-inactive": { | ||
"value": "eligibility" | ||
}, | ||
"invalidToken": { | ||
"value": "eligibility" | ||
} | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "successful operation", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/Post" | ||
} | ||
} | ||
} | ||
}, | ||
"x-mock-file": "", | ||
"x-examples": { | ||
"default": { | ||
"parameters": [ | ||
{ | ||
"value": null | ||
}, | ||
{ | ||
"value": null | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"Post": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "integer", | ||
"format": "int64" | ||
}, | ||
"userId": { | ||
"type": "integer", | ||
"format": "int64" | ||
}, | ||
"title": { | ||
"type": "string" | ||
}, | ||
"body": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"User": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "integer", | ||
"format": "int64" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"username": { | ||
"type": "string" | ||
}, | ||
"email": { | ||
"type": "string", | ||
"format": "email" | ||
}, | ||
"phone": { | ||
"type": "string" | ||
}, | ||
"website": { | ||
"type": "string" | ||
}, | ||
"company": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"catchPhrase": { | ||
"type": "string" | ||
}, | ||
"bs": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"address": { | ||
"type": "object", | ||
"properties": { | ||
"street": { | ||
"type": "string" | ||
}, | ||
"suite": { | ||
"type": "string" | ||
}, | ||
"city": { | ||
"type": "string" | ||
}, | ||
"zipcode": { | ||
"type": "string" | ||
}, | ||
"geo": { | ||
"type": "object", | ||
"properties": { | ||
"lat": { | ||
"type": "string" | ||
}, | ||
"lng": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains 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
Oops, something went wrong.