1482 lines
35 KiB
JSON
1482 lines
35 KiB
JSON
{
|
|
"x-generator": "NSwag v14.5.0.0 (NJsonSchema v11.4.0.0 (Newtonsoft.Json v13.0.0.0))",
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "My Title",
|
|
"version": "1.0.0"
|
|
},
|
|
"servers": [
|
|
{
|
|
"url": "http://localhost:5259"
|
|
}
|
|
],
|
|
"paths": {
|
|
"/api/auth/register": {
|
|
"post": {
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"operationId": "Auth_Register",
|
|
"requestBody": {
|
|
"x-name": "dto",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RegisterDto"
|
|
}
|
|
}
|
|
},
|
|
"required": true,
|
|
"x-position": 1
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/auth/login": {
|
|
"post": {
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"operationId": "Auth_Login",
|
|
"requestBody": {
|
|
"x-name": "dto",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LoginDto"
|
|
}
|
|
}
|
|
},
|
|
"required": true,
|
|
"x-position": 1
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TokenDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/auth/refresh": {
|
|
"post": {
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"operationId": "Auth_Refresh",
|
|
"requestBody": {
|
|
"x-name": "dto",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RefreshDto"
|
|
}
|
|
}
|
|
},
|
|
"required": true,
|
|
"x-position": 1
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TokenDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/posts": {
|
|
"post": {
|
|
"tags": [
|
|
"Post"
|
|
],
|
|
"operationId": "Post_Create",
|
|
"requestBody": {
|
|
"x-name": "dto",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CreatePostDto"
|
|
}
|
|
}
|
|
},
|
|
"required": true,
|
|
"x-position": 1
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PostDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"409": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"tags": [
|
|
"Post"
|
|
],
|
|
"operationId": "Post_GetAll",
|
|
"parameters": [
|
|
{
|
|
"name": "pageNumber",
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 1,
|
|
"maximum": 2147483647.0,
|
|
"minimum": 1.0
|
|
},
|
|
"x-position": 1
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PagedListOfPostDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/posts/{postId}/files/{fileId}": {
|
|
"patch": {
|
|
"tags": [
|
|
"Post"
|
|
],
|
|
"operationId": "Post_PatchFileContent",
|
|
"parameters": [
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 1
|
|
},
|
|
{
|
|
"name": "fileId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 2
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/octet-stream": {
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"tags": [
|
|
"Post"
|
|
],
|
|
"operationId": "Post_GetFileContent",
|
|
"parameters": [
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 1
|
|
},
|
|
{
|
|
"name": "fileId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 2
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/octet-stream": {
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/posts/{id}": {
|
|
"get": {
|
|
"tags": [
|
|
"Post"
|
|
],
|
|
"operationId": "Post_Get",
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 1
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PostDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Post"
|
|
],
|
|
"operationId": "Post_Delete",
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 1
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"Post"
|
|
],
|
|
"operationId": "Post_Update",
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 1
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"x-name": "dto",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EditPostDto"
|
|
}
|
|
}
|
|
},
|
|
"required": true,
|
|
"x-position": 2
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PostDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/posts/{postId}/comments": {
|
|
"post": {
|
|
"tags": [
|
|
"Post"
|
|
],
|
|
"operationId": "Post_CreateComment",
|
|
"parameters": [
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 1
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"x-name": "dto",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CreateCommentDto"
|
|
}
|
|
}
|
|
},
|
|
"required": true,
|
|
"x-position": 2
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PostDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"409": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"tags": [
|
|
"Post"
|
|
],
|
|
"operationId": "Post_GetAllComments",
|
|
"parameters": [
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 1
|
|
},
|
|
{
|
|
"name": "pageNumber",
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 1,
|
|
"maximum": 2147483647.0,
|
|
"minimum": 1.0
|
|
},
|
|
"x-position": 2
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PagedListOfCommentDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/posts/{postId}/comments/{commentId}": {
|
|
"get": {
|
|
"tags": [
|
|
"Post"
|
|
],
|
|
"operationId": "Post_GetComment",
|
|
"parameters": [
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 1
|
|
},
|
|
{
|
|
"name": "commentId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 2
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CommentDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Post"
|
|
],
|
|
"operationId": "Post_DeleteComment",
|
|
"parameters": [
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 1
|
|
},
|
|
{
|
|
"name": "commentId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 2
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"Post"
|
|
],
|
|
"operationId": "Post_Update2",
|
|
"parameters": [
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 1
|
|
},
|
|
{
|
|
"name": "commentId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"x-position": 2
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"x-name": "dto",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EditCommentDto"
|
|
}
|
|
}
|
|
},
|
|
"required": true,
|
|
"x-position": 3
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CommentDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/tags": {
|
|
"post": {
|
|
"tags": [
|
|
"Tag"
|
|
],
|
|
"operationId": "Tag_Create",
|
|
"requestBody": {
|
|
"x-name": "dto",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CreateTagDto"
|
|
}
|
|
}
|
|
},
|
|
"required": true,
|
|
"x-position": 1
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Tag"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"409": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"tags": [
|
|
"Tag"
|
|
],
|
|
"operationId": "Tag_GetAll",
|
|
"parameters": [
|
|
{
|
|
"name": "pageNumber",
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"default": 1
|
|
},
|
|
"x-position": 1
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PagedListOfTag"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/tags/{name}": {
|
|
"get": {
|
|
"tags": [
|
|
"Tag"
|
|
],
|
|
"operationId": "Tag_Get",
|
|
"parameters": [
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"x-position": 1
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Tag"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Tag"
|
|
],
|
|
"operationId": "Tag_Delete",
|
|
"parameters": [
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"x-position": 1
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": ""
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"Tag"
|
|
],
|
|
"operationId": "Tag_Update",
|
|
"parameters": [
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"x-position": 1
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"x-name": "dto",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EditTagDto"
|
|
}
|
|
}
|
|
},
|
|
"required": true,
|
|
"x-position": 2
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Tag"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"User": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/IdentityUser"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"IdentityUser": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/IdentityUserOfString"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"description": "The default implementation of IdentityUser`1 which uses a string as a primary key.",
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"IdentityUserOfString": {
|
|
"type": "object",
|
|
"description": "Represents a user in the identity system",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "Gets or sets the primary key for this user.",
|
|
"nullable": true
|
|
},
|
|
"userName": {
|
|
"type": "string",
|
|
"description": "Gets or sets the user name for this user.",
|
|
"nullable": true
|
|
},
|
|
"normalizedUserName": {
|
|
"type": "string",
|
|
"description": "Gets or sets the normalized user name for this user.",
|
|
"nullable": true
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"description": "Gets or sets the email address for this user.",
|
|
"nullable": true
|
|
},
|
|
"normalizedEmail": {
|
|
"type": "string",
|
|
"description": "Gets or sets the normalized email address for this user.",
|
|
"nullable": true
|
|
},
|
|
"emailConfirmed": {
|
|
"type": "boolean",
|
|
"description": "Gets or sets a flag indicating if a user has confirmed their email address."
|
|
},
|
|
"passwordHash": {
|
|
"type": "string",
|
|
"description": "Gets or sets a salted and hashed representation of the password for this user.",
|
|
"nullable": true
|
|
},
|
|
"securityStamp": {
|
|
"type": "string",
|
|
"description": "A random value that must change whenever a users credentials change (password changed, login removed)",
|
|
"nullable": true
|
|
},
|
|
"concurrencyStamp": {
|
|
"type": "string",
|
|
"description": "A random value that must change whenever a user is persisted to the store",
|
|
"nullable": true
|
|
},
|
|
"phoneNumber": {
|
|
"type": "string",
|
|
"description": "Gets or sets a telephone number for the user.",
|
|
"nullable": true
|
|
},
|
|
"phoneNumberConfirmed": {
|
|
"type": "boolean",
|
|
"description": "Gets or sets a flag indicating if a user has confirmed their telephone address."
|
|
},
|
|
"twoFactorEnabled": {
|
|
"type": "boolean",
|
|
"description": "Gets or sets a flag indicating if two factor authentication is enabled for this user."
|
|
},
|
|
"lockoutEnd": {
|
|
"type": "string",
|
|
"description": "Gets or sets the date and time, in UTC, when any user lockout ends.",
|
|
"format": "date-time",
|
|
"nullable": true
|
|
},
|
|
"lockoutEnabled": {
|
|
"type": "boolean",
|
|
"description": "Gets or sets a flag indicating if the user could be locked out."
|
|
},
|
|
"accessFailedCount": {
|
|
"type": "integer",
|
|
"description": "Gets or sets the number of failed login attempts for the current user.",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
},
|
|
"RegisterDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"userName": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"TokenDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"accessToken": {
|
|
"type": "string"
|
|
},
|
|
"refreshToken": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"ProblemDetails": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"nullable": true
|
|
},
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"nullable": true
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"instance": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"extensions": {
|
|
"type": "object",
|
|
"additionalProperties": {}
|
|
}
|
|
}
|
|
},
|
|
"LoginDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"RefreshDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"refreshToken": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"PostDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"author": {
|
|
"$ref": "#/components/schemas/SlimUserDto"
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Tag"
|
|
}
|
|
},
|
|
"fileUrl": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"SlimUserDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"userId": {
|
|
"type": "string"
|
|
},
|
|
"userName": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Tag": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"$ref": "#/components/schemas/TagType"
|
|
}
|
|
}
|
|
},
|
|
"TagType": {
|
|
"type": "string",
|
|
"description": "",
|
|
"x-enum-names": [
|
|
"General",
|
|
"Copyright"
|
|
],
|
|
"x-enum-varnames": [
|
|
"General",
|
|
"Copyright"
|
|
],
|
|
"x-enumNames": [
|
|
"General",
|
|
"Copyright"
|
|
],
|
|
"x-enum-descriptions": [
|
|
null,
|
|
null
|
|
],
|
|
"x-enumDescriptions": [
|
|
null,
|
|
null
|
|
],
|
|
"enum": [
|
|
"General",
|
|
"Copyright"
|
|
]
|
|
},
|
|
"CreatePostDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"fileName": {
|
|
"type": "string"
|
|
},
|
|
"fileMimeType": {
|
|
"type": "string"
|
|
},
|
|
"fileSize": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"nullable": true
|
|
}
|
|
}
|
|
},
|
|
"PagedListOfPostDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"currentPage": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"pageSize": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"totalCount": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"totalPages": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PostDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"EditPostDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"nullable": true,
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"CreateCommentDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"CommentDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"author": {
|
|
"$ref": "#/components/schemas/SlimUserDto"
|
|
}
|
|
}
|
|
},
|
|
"PagedListOfCommentDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"currentPage": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"pageSize": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"totalCount": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"totalPages": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/CommentDto"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"EditCommentDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"CreateTagDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"$ref": "#/components/schemas/TagType"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"PagedListOfTag": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"currentPage": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"pageSize": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"totalCount": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"totalPages": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Tag"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"EditTagDto": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"type": {
|
|
"$ref": "#/components/schemas/TagType"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |