aboutsummaryrefslogtreecommitdiffstats
path: root/www/swagger/spec-files/security.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'www/swagger/spec-files/security.yaml')
-rw-r--r--www/swagger/spec-files/security.yaml171
1 files changed, 171 insertions, 0 deletions
diff --git a/www/swagger/spec-files/security.yaml b/www/swagger/spec-files/security.yaml
new file mode 100644
index 0000000..d1b2ff1
--- /dev/null
+++ b/www/swagger/spec-files/security.yaml
@@ -0,0 +1,171 @@
+swagger: '2.0'
+info:
+ version: 1.0.9-abcd
+ title: Swagger Sample API
+ description: A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification
+ termsOfService: http://helloreverb.com/terms/
+ contact:
+ name: swagger api team
+ url: http://swagger.io
+ license:
+ name: Creative Commons 4.0 International
+ url: http://creativecommons.org/licenses/by/4.0/
+basePath: /v1
+schemes:
+ - http
+ - https
+consumes:
+ - application/json
+produces:
+ - application/json
+ - application/xml
+security:
+ - githubAccessCode:
+ - user
+ - user:email
+ - user:follow
+ - public_repo
+ - repo
+ - repo_deployment
+ - repo:status
+ - delete_repo
+ - notifications
+ - gist
+ - read:repo_hook
+ - write:repo_hook
+ - admin:repo_hook
+ - read:org
+ - write:org
+ - admin:org
+ - read:public_key
+ - write:public_key
+ - admin:public_key
+ - petstoreImplicit:
+ - user
+ - user:email
+ - user:follow
+ - public_repo
+ - repo
+ - repo_deployment
+ - repo:status
+ - delete_repo
+ - notifications
+ - gist
+ - read:repo_hook
+ - write:repo_hook
+ - admin:repo_hook
+ - read:org
+ - write:org
+ - admin:org
+ - read:public_key
+ - write:public_key
+ - admin:public_key
+ - internalApiKey: []
+paths:
+ /pets/{id}:
+ get:
+ parameters:
+ - name: id
+ in: path
+ description: ID of pet to use
+ required: true
+ type: array
+ items:
+ type: string
+ collectionFormat: csv
+ description: Returns pets based on ID
+ summary: Find pets by ID
+ operationId: getPetsById
+ security:
+ - githubAccessCode:
+ - user
+ - internalApiKey: []
+ produces:
+ - application/json
+ - text/html
+ responses:
+ "200":
+ description: pet response
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Pet'
+ default:
+ description: error payload
+ schema:
+ $ref: '#/definitions/ErrorModel'
+securityDefinitions:
+ githubAccessCode:
+ type: oauth2
+ scopes:
+ user: Grants read/write access to profile info only. Note that this scope includes user:email and user:follow.
+ user:email: Grants read access to a user’s email addresses.
+ user:follow: Grants access to follow or unfollow other users.
+ public_repo: Grants read/write access to code, commit statuses, and deployment statuses for public repositories and organizations.
+ repo: Grants read/write access to code, commit statuses, and deployment statuses for public and private repositories and organizations.
+ repo_deployment: Grants access to deployment statuses for public and private repositories. This scope is only necessary to grant other users or services access to deployment statuses, without granting access to the code.
+ repo:status: Grants read/write access to public and private repository commit statuses. This scope is only necessary to grant other users or services access to private repository commit statuses without granting access to the code.
+ delete_repo: Grants access to delete adminable repositories.
+ notifications: Grants read access to a user’s notifications. repo also provides this access.
+ gist: Grants write access to gists.
+ read:repo_hook: Grants read and ping access to hooks in public or private repositories.
+ write:repo_hook: Grants read, write, and ping access to hooks in public or private repositories.
+ admin:repo_hook: Grants read, write, ping, and delete access to hooks in public or private repositories.
+ read:org: Read-only access to organization, teams, and membership.
+ write:org: Publicize and unpublicize organization membership.
+ admin:org: Fully manage organization, teams, and memberships.
+ read:public_key: List and view details for public keys.
+ write:public_key: Create, list, and view details for public keys.
+ admin:public_key: Fully manage public keys.
+ flow: accessCode
+ authorizationUrl: https://github.com/login/oauth/authorize
+ tokenUrl: https://github.com/login/oauth/access_token
+ petstoreImplicit:
+ type: oauth2
+ scopes:
+ user: Grants read/write access to profile info only. Note that this scope includes user:email and user:follow.
+ user:email: Grants read access to a user’s email addresses.
+ user:follow: Grants access to follow or unfollow other users.
+ public_repo: Grants read/write access to code, commit statuses, and deployment statuses for public repositories and organizations.
+ repo: Grants read/write access to code, commit statuses, and deployment statuses for public and private repositories and organizations.
+ repo_deployment: Grants access to deployment statuses for public and private repositories. This scope is only necessary to grant other users or services access to deployment statuses, without granting access to the code.
+ repo:status: Grants read/write access to public and private repository commit statuses. This scope is only necessary to grant other users or services access to private repository commit statuses without granting access to the code.
+ delete_repo: Grants access to delete adminable repositories.
+ notifications: Grants read access to a user’s notifications. repo also provides this access.
+ gist: Grants write access to gists.
+ read:repo_hook: Grants read and ping access to hooks in public or private repositories.
+ write:repo_hook: Grants read, write, and ping access to hooks in public or private repositories.
+ admin:repo_hook: Grants read, write, ping, and delete access to hooks in public or private repositories.
+ read:org: Read-only access to organization, teams, and membership.
+ write:org: Publicize and unpublicize organization membership.
+ admin:org: Fully manage organization, teams, and memberships.
+ read:public_key: List and view details for public keys.
+ write:public_key: Create, list, and view details for public keys.
+ admin:public_key: Fully manage public keys.
+ flow: implicit
+ authorizationUrl: http://petstore.swagger.io/oauth/dialog
+ internalApiKey:
+ type: apiKey
+ in: header
+ name: api_key
+definitions:
+ Pet:
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ type: string
+ tag:
+ type: string
+ ErrorModel:
+ type: object
+ required:
+ - code
+ - message
+ properties:
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string