Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 6b3c455c

Přidáno uživatelem Jakub Hlaváč před téměř 4 roky(ů)

#8367 - Specifikace Open API 3.0 - login

+ definition of API endpoints needed for login

Zobrazit rozdíly:

src/app/shared/api/openapi.yaml
1
openapi: 3.0.1
2
info:
3
  title: SensLog
4
  description: 'ASWI semestral project of CodeBakers.'
5
  version: 1.0.0
6
externalDocs:
7
  description: Find out more about Swagger
8
  url: http://swagger.io
9
servers:
10
- url: http://51.15.45.95:8080/senslog1/
11
tags:
12
- name: login
13
  description: Login process
14
  externalDocs:
15
    description: Find out more
16
    url: https://www.senslog.org/api/v1/
17
- name: group
18
  description: Groups endpoints
19
paths:
20
  /ControllerServlet:
21
    post:
22
      security: []
23
      tags:
24
      - login
25
      summary: Authorize login
26
      operationId: login
27
      parameters: 
28
        - in: query
29
          name: login
30
          schema:
31
            type: string
32
          description: User login
33
        - in: query
34
          name: password
35
          schema:
36
            type: string
37
          description: User password
38
      responses:
39
        200:
40
          description: successful operation
41
          content:
42
            application/json:
43
              schema:
44
                $ref: '#/components/schemas/Login'
45
  
46
  /GroupService:
47
    get:
48
      tags:
49
      - group
50
      summary: Get groups
51
      operationId: getGroups
52
      parameters:
53
        - in: query
54
          name: operation
55
          required: true
56
          schema:
57
            type: string
58
            default: GetGroups
59
            enum:
60
            - GetGroups
61
            - GetSuperGroups
62
            - GetSubGroups
63
          description: Group operation
64
        - in: query
65
          name: parent_group
66
          schema:
67
            type: integer
68
      responses:
69
        200:
70
          description: successful operation
71
          content:
72
            application/json:
73
              schema:
74
                type: array
75
                items:
76
                  $ref: '#/components/schemas/Group'
77
      
78
components:
79
  schemas:
80
    Login:
81
      type: object
82
      properties:
83
        sessionid:
84
          type: string
85
          example: rv6pe5o30091 
86
        language:
87
          type: string
88
          example: en
89
        audio:
90
          type: boolean
91
          default: false
92
    
93
    Group:
94
      type: object
95
      properties:
96
        id:
97
          type: integer
98
          format: int64
99
          example: 1
100
        parent_group_id:
101
          type: integer
102
          format: int64
103
          example: 2
104
        group_name:
105
          type: string
106
          example: testGroup
107
        has_children:
108
          type: boolean
109
          default: false
110
        
111
    
112
      
113
  securitySchemes:
114
    cookieAuth:
115
      type: apiKey
116
      in: cookie
117
      name: JSESSIONID
118
      
119
security:
120
  - cookieAuth: []

Také k dispozici: Unified diff