| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- openapi: 3.0.0
- info:
- title: learning
- description: 培训考试
- version: 0.0.1
- paths:
- /Test.Nullable:
- post:
- tags:
- - 测试
- operationId: Test.Nullable
- summary: 测试空值参数
- requestBody:
- required: true
- content:
- application/json:
- schema:
- oneOf:
- - $ref: '#/components/schemas/Nullable'
- examples:
- AllPass:
- $ref: '#/components/examples/NullableReqAllPass'
- responses:
- 200:
- description: 请求成功
- content:
- application/json:
- examples:
- success:
- $ref: "#/components/examples/success"
- /LearningSkill.List:
- post:
- tags:
- - 考试培训-技能
- operationId: LearningSkill.List
- summary: 技能列表
- requestBody:
- required: true
- content:
- application/json:
- schema:
- oneOf:
- - $ref: '#/components/schemas/NoArgs'
- examples:
- NoArgs:
- $ref: '#/components/examples/NoArgs'
- responses:
- 200:
- description: 请求成功
- content:
- application/json:
- examples:
- success:
- $ref: "#/components/examples/success"
- /LearningSkill.Get:
- post:
- tags:
- - 考试培训-技能
- operationId: LearningSkill.Get
- summary: 技能详情
- requestBody:
- required: true
- content:
- application/json:
- schema:
- oneOf:
- - $ref: '#/components/schemas/LearningSkillGet'
- examples:
- LearningSkillGet:
- $ref: '#/components/examples/LearningSkillGet'
- responses:
- 200:
- description: 请求成功
- content:
- application/json:
- examples:
- success:
- $ref: "#/components/examples/success"
- /LearningSkill.Add:
- post:
- tags:
- - 考试培训-技能
- operationId: LearningSkill.Add
- summary: 添加技能
- requestBody:
- required: true
- content:
- application/json:
- schema:
- oneOf:
- - $ref: '#/components/schemas/LearningSkillAdd'
- examples:
- LearningSkillAdd:
- $ref: '#/components/examples/LearningSkillAdd'
- responses:
- 200:
- description: 请求成功
- content:
- application/json:
- examples:
- success:
- $ref: "#/components/examples/success"
- /LearningSkill.Update:
- post:
- tags:
- - 考试培训-技能
- operationId: LearningSkill.Update
- summary: 更新技能
- requestBody:
- required: true
- content:
- application/json:
- schema:
- oneOf:
- - $ref: '#/components/schemas/LearningSkillUpdate'
- examples:
- LearningSkillUpdate:
- $ref: '#/components/examples/LearningSkillUpdate'
- responses:
- 200:
- description: 请求成功
- content:
- application/json:
- examples:
- success:
- $ref: "#/components/examples/success"
- /LearningSkill.Delete:
- post:
- tags:
- - 考试培训-技能
- operationId: LearningSkill.Delete
- summary: 删除技能
- requestBody:
- required: true
- content:
- application/json:
- schema:
- oneOf:
- - $ref: '#/components/schemas/IdReq'
- examples:
- LearningSkillDelete:
- $ref: '#/components/examples/LearningSkillDelete'
- responses:
- 200:
- description: 请求成功
- content:
- application/json:
- examples:
- success:
- $ref: "#/components/examples/success"
- # 添加这个 swagger ui 会显示授权按钮
- security:
- - bearerAuth: []
- components:
- securitySchemes:
- basicAuth:
- type: http
- scheme: basic
- bearerAuth:
- type: http
- scheme: bearer
- schemas:
- Nullable:
- type: object
- required:
- - Str
- - Int
- - Bool
- - Slice
- properties:
- Str:
- type: string
- description: 字符串参数
- Int:
- type: integer
- description: Int 参数
- Bool:
- type: boolean
- description: Bool 参数
- Slice:
- type: array
- description: Slice 参数
- items:
- type: integer
- NoArgs:
- type: object
- properties:
- noargs:
- type: string
- description: 无参数,但是 body 中必须传输一个 json 空对象 "{}"
- LearningSkillGet:
- properties:
- id:
- type: string
- description: 技能 id
- name:
- type: string
- description: 技能名称
- LearningSkillAdd:
- properties:
- instrumentId:
- type: string
- description: 技能关联的设备 id
- name:
- type: string
- description: 技能名称
- LearningSkillUpdate:
- properties:
- id:
- type: string
- description: 技能 id
- instrumentId:
- type: string
- description: 技能关联的设备 id
- name:
- type: string
- description: 技能名称
- IdReq:
- type: object
- required:
- - id
- properties:
- id:
- type: integer
- description: ID
- examples:
- success:
- summary: 请求成功
- value:
- code: 200,
- msg: "success"
- NullableReqAllPass:
- value:
- Str: ""
- Int: 0
- Bool: false
- Slice: []
- NoArgs:
- value:
- noargs: ""
- LearningSkillGet:
- value:
- Id: 1
- LearningSkillAdd:
- value:
- name: 测试
- instrumentId: [1,2]
- LearningSkillUpdate:
- value:
- name: 测试更新
- instrumentId: [3,4]
- id: 1
- LearningSkillDelete:
- value:
- id: 1
|