esoe
2 weeks ago
9 changed files with 221 additions and 113 deletions
@ -1,45 +0,0 @@
@@ -1,45 +0,0 @@
|
||||
openapi: '3.0.3' |
||||
info: |
||||
title: exam-api |
||||
description: API for exam |
||||
termsOfService: 'http://localhost:100/hello' |
||||
version: '1.0' |
||||
servers: |
||||
- url: http://localhost:100 |
||||
paths: |
||||
/hello: |
||||
get: |
||||
responses: |
||||
'200': |
||||
description: OK |
||||
/api/v1/organizations: |
||||
get: |
||||
responses: |
||||
'200': |
||||
description: OK |
||||
content: |
||||
application/json: |
||||
schema: |
||||
$ref: "./components.yaml#/components/schemas/organization" |
||||
description: Get all organizations |
||||
post: |
||||
summary: repo.createOrganization() Возвращает полный список организаци в базе |
||||
description: Создание новой должности |
||||
requestBody: |
||||
content: |
||||
application/json: |
||||
schema: |
||||
type: object |
||||
required: |
||||
- name |
||||
properties: |
||||
name: |
||||
type: string |
||||
responses: |
||||
'200': |
||||
description: OK |
||||
content: |
||||
application/json: |
||||
schema: |
||||
$ref: "./components.yaml#/components/schemas/organization" |
||||
|
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
paths: |
||||
api.v1.accounts: |
||||
get: |
||||
responses: |
||||
'200': |
||||
description: OK |
||||
content: |
||||
application/json: |
||||
schema: |
||||
$ref: "../components.yaml#/components/schemas/accounts" |
||||
description: Получение перечня аккаунтов |
||||
post: |
||||
summary: repo.createAccount() Создание нового аккаунта. |
||||
description: Предварительно должны быть созданы организации и должности |
||||
requestBody: |
||||
content: |
||||
application/json: |
||||
schema: |
||||
type: object |
||||
required: |
||||
- name |
||||
properties: |
||||
name: |
||||
type: string |
||||
responses: |
||||
'200': |
||||
description: OK |
||||
content: |
||||
application/json: |
||||
schema: |
||||
$ref: "../components.yaml#/components/schemas/accounts" |
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
paths: |
||||
api.v1.organizations: |
||||
get: |
||||
responses: |
||||
'200': |
||||
description: OK |
||||
content: |
||||
application/json: |
||||
schema: |
||||
$ref: "../components.yaml#/components/schemas/organization" |
||||
description: Get all organizations |
||||
post: |
||||
summary: repo.createOrganization() Создает в базе запись о новой организации |
||||
description: Предварительных требований не предусмотрено |
||||
requestBody: |
||||
content: |
||||
application/json: |
||||
schema: |
||||
type: object |
||||
required: |
||||
- name |
||||
properties: |
||||
name: |
||||
type: string |
||||
responses: |
||||
'200': |
||||
description: OK |
||||
content: |
||||
application/json: |
||||
schema: |
||||
$ref: "../components.yaml#/components/schemas/organization" |
@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
|
||||
paths: |
||||
api.v1.positions: |
||||
get: |
||||
summary: repo.find() Возвращает полный список должностей |
||||
description: Для разных организаций должности могут повторяться. Предусмотреть пагинацию при получении должностей, список может быть огромным |
||||
responses: |
||||
'200': |
||||
description: Получение списка должностей |
||||
content: |
||||
application/json: |
||||
schema: |
||||
$ref: "../components.yaml#/components/schemas/position" |
||||
post: |
||||
summary: repo.create() Создает в базе запись о новой должности |
||||
description: Предварительно должна существовать организация. Должность привязываетс для каждой организации, для разных организаций должности могут повторяться. |
||||
requestBody: |
||||
content: |
||||
application/json: |
||||
schema: |
||||
type: object |
||||
required: |
||||
- name |
||||
- organization |
||||
properties: |
||||
name: |
||||
type: string |
||||
organization: |
||||
type: object |
||||
properties: |
||||
id: |
||||
type: integer |
||||
responses: |
||||
'200': |
||||
description: OK |
||||
content: |
||||
application/json: |
||||
schema: |
||||
$ref: "../components.yaml#/components/schemas/position" |
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
paths: |
||||
hello: |
||||
summary: Возвращает текущую страницу описания сервиса |
||||
get: |
||||
responses: |
||||
'200': |
||||
description: Справка по структуре приложения hello/main.md |
@ -1,50 +0,0 @@
@@ -1,50 +0,0 @@
|
||||
openapi: '3.0.3' |
||||
info: |
||||
title: exam-api |
||||
description: API for exam |
||||
termsOfService: 'http://localhost:100/hello' |
||||
version: '1.0' |
||||
servers: |
||||
- url: http://localhost:100 |
||||
paths: |
||||
/hello: |
||||
get: |
||||
responses: |
||||
'200': |
||||
description: OK |
||||
/api/v1/positions: |
||||
get: |
||||
responses: |
||||
'200': |
||||
description: OK |
||||
content: |
||||
application/json: |
||||
schema: |
||||
$ref: "./components.yaml#/components/schemas/position" |
||||
description: Get all positions |
||||
post: |
||||
summary: repo.create() Возвращает полный список должностей в базе |
||||
description: Создание новой должности |
||||
requestBody: |
||||
content: |
||||
application/json: |
||||
schema: |
||||
type: object |
||||
required: |
||||
- name |
||||
- organization |
||||
properties: |
||||
name: |
||||
type: string |
||||
organization: |
||||
type: object |
||||
properties: |
||||
id: |
||||
type: integer |
||||
responses: |
||||
'200': |
||||
description: OK |
||||
content: |
||||
application/json: |
||||
schema: |
||||
$ref: "./components.yaml#/components/schemas/position" |
Loading…
Reference in new issue