Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CS-04] Adds Open Api #13

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
cef7c39
[CS-04] Adds Open Api for generate_certificate
4klb Oct 13, 2022
c71359c
deletes documents folder
4klb Oct 13, 2022
5287dd5
Adds Open Api for select_template
4klb Oct 14, 2022
455ee9c
[CS-04] Fix Open Api for select_template
4klb Oct 14, 2022
a72eca8
Adds Open Api for generate_name
4klb Oct 14, 2022
737adbe
[CS-04] Fix Open Api for select_template
4klb Oct 14, 2022
33d8ff3
[CS-04] Adds Open Api for save_file
4klb Oct 14, 2022
76d1065
[CS-04] Adds Open Api for get_certificate
4klb Oct 14, 2022
7422c11
[CS-04] Fix Open Api for generate_name
4klb Oct 14, 2022
e95ca7c
[CS-04] Fix Open Api for save_file
4klb Oct 14, 2022
02231f3
[CS-04] Fix Open Api for select_template
4klb Oct 14, 2022
2f59db8
[CS-04] Rename filename to lowercase
4klb Oct 14, 2022
1c6694f
[CS-04] Rename path to lowercase
4klb Oct 14, 2022
71ce72d
[CS-04] Fix return Open Api for generate_name
4klb Oct 14, 2022
330b530
[CS-04] Rename properties Open Api for save_file
4klb Oct 14, 2022
11d3ef1
[CS-04] Rename properties Open Api for select_template
4klb Oct 14, 2022
f521735
[CS-04] Rename properties Open Api for generate_certificate
4klb Oct 14, 2022
a026b36
[CS-04] Rename parameters Open Api for save_file
4klb Oct 14, 2022
7d64b1c
[CS-04] Fix ref
4klb Oct 14, 2022
6ad8932
[CS-04] Fix ref
4klb Oct 14, 2022
66a0756
[CS-04] some changes
4klb Oct 14, 2022
b5c0f03
[CS-04] delete components
4klb Oct 14, 2022
073dc0b
[CS-04] return and replace components
4klb Oct 14, 2022
ef43ffa
[CS-04] replace components
4klb Oct 14, 2022
a76f522
[CS-04] replace components
4klb Oct 14, 2022
3375cc4
[CS-04] some changes
4klb Oct 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions api/rest/generatecertificate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
openapi: 3.0.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Все запросы лучше описать в одном файле

info:
title: Swagger certificate service - OpenAPI 3.0
version: 0.0.1
description: "Open API for the certificate microservice"
servers:
- url: http://localhost:8080/certificateService
paths:
/generatecertificate:
post:
tags:
- certificate
summary: Method for certificate generating
description: ''
operationId: generateCertificate
parameters:
- name: student
in: query
description: ''
required: true
schema:
type: string
- name: course
in: query
description: ''
required: true
schema:
type: string
- name: courseType
in: query
description: ''
required: true
schema:
type: string
- name: templateName
in: query
description: ''
required: true
schema:
type: string
- name: hours
in: query
description: ''
required: true
schema:
type: number
format: float
requestBody:
content:
application/octet-stream:
schema:
type: string
format: binary
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Certificate'
'400':
description: Invalid parameters
'404':
description: Not found
'500':
description: Internal server error
default:
description: Unexpected error


components:
schemas:
Certificate:
type: object
required:
- name
- status
properties:
name:
type: string

62 changes: 62 additions & 0 deletions api/rest/generatename.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
openapi: 3.0.0
info:
title: Swagger certificate service - OpenAPI 3.0
version: 0.0.1
description: "Open API for the certificate microservice"
servers:
- url: http://localhost:8080/certificateService
paths:
/generatename:
post:
tags:
- file
summary: Method for generating the file name
description: ''
operationId: generateName
parameters:
- name: student
in: query
description: ''
required: true
schema:
type: string
- name: course
in: query
description: ''
required: true
schema:
type: string
- name: templateName
in: query
description: ''
required: true
schema:
type: string
requestBody:
content:
application/octet-stream:
schema:
type: string
format: binary
responses:
'200':
description: successful operation
content:
application/json:
schema:
properties:
id:
type: string
format: binary
'400':
description: Invalid parameters
'404':
description: Not found
'500':
description: Internal server error
default:
description: Unexpected error




65 changes: 65 additions & 0 deletions api/rest/getcertificate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
openapi: 3.0.0
info:
title: Swagger certificate service - OpenAPI 3.0
version: 0.0.1
description: "Open API for the certificate microservice"
servers:
- url: http://localhost:8080/certificateService
paths:
/getcertificate:
post:
tags:
- Certificate
summary: Method to handle a web-service request
description: ''
operationId: webrequest
parameters:
- name: student
in: query
description: ''
required: true
schema:
type: string
- name: course
in: query
description: ''
required: true
schema:
type: string
- name: templateName
in: query
description: ''
required: true
schema:
type: string
requestBody:
content:
application/octet-stream:
schema:
type: string
format: binary
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Certificate'
'400':
description: Invalid parameters
'404':
description: Not found
'500':
description: Internal server error
default:
description: Unexpected error


components:
schemas:
Certificate:
type: object
properties:
certificate:
type: string
format: byte
45 changes: 45 additions & 0 deletions api/rest/savefile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
openapi: 3.0.0
info:
title: Swagger certificate service - OpenAPI 3.0
version: 0.0.1
description: "Open API for the certificate microservice"
servers:
- url: http://localhost:8080/certificateService
paths:
/savefile:
post:
tags:
- file
summary: Method for saving a file to the storage
description: ''
operationId: saveFile
parameters:
- name: templateName
in: query
description: ''
required: true
schema:
type: string
requestBody:
content:
application/octet-stream:
schema:
type: string
format: binary
responses:
'200':
description: successful operation
content:
application/json:
schema:
properties:
path:
type: string
'400':
description: Invalid parameters
'404':
description: Not found
'500':
description: Internal server error
default:
description: Unexpected error
47 changes: 47 additions & 0 deletions api/rest/selecttemplate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
openapi: 3.0.0
info:
title: Swagger certificate service - OpenAPI 3.0
version: 0.0.1
description: "Open API for the certificate microservice"
servers:
- url: http://localhost:8080/certificateService
paths:
/selecttemplate:
post:
tags:
- template
summary: Method for selecting template from storage
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это, похоже, внутренний запрос. Не стоит смешивать внешние/внутренние запросы

description: ''
operationId: selectTemplate
parameters:
- name: templateName
in: query
description: ''
required: true
schema:
type: string
requestBody:
content:
application/octet-stream:
schema:
type: string
format: binary
responses:
'200':
description: successful operation
content:
application/json:
schema:
properties:
link:
type: string
'400':
description: Invalid parameters
'404':
description: Not found
'500':
description: Internal server error
default:
description: Unexpected error


Empty file removed documents/uml/.gitkeep
Empty file.