189 lines
3.7 KiB
Plaintext
189 lines
3.7 KiB
Plaintext
{
|
|
"openapi": "3.0.1",
|
|
"info": {
|
|
"title": "LeetU",
|
|
"version": "1.0"
|
|
},
|
|
"paths": {
|
|
"/course": {
|
|
"get": {
|
|
"tags": [
|
|
"Course"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Course"
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Course"
|
|
}
|
|
},
|
|
"text/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Course"
|
|
}
|
|
},
|
|
"application/*+json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Course"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/course/{courseId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Course"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "courseId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/student/{studentId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Student"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "studentId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/student": {
|
|
"get": {
|
|
"tags": [
|
|
"Student"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/student/{studentId}/course": {
|
|
"get": {
|
|
"tags": [
|
|
"Student"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "studentId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/student/{studentId}/course/{courseId}": {
|
|
"post": {
|
|
"tags": [
|
|
"Student"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "studentId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
},
|
|
{
|
|
"name": "courseId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"Course": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"startDate": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
}
|
|
} |