aboutsummaryrefslogtreecommitdiffstats
path: root/www/swagger/spec-files/security.yaml
blob: d1b2ff1c1621427d642fbf417bc91083914db9fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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