add better auth
This commit is contained in:
760
http-api/swagger/index.html
Normal file
760
http-api/swagger/index.html
Normal file
@@ -0,0 +1,760 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Swagger UI</title>
|
||||
<meta
|
||||
http-equiv="Cache-control"
|
||||
content="no-cache, no-store, must-revalidate"
|
||||
/>
|
||||
<link rel='stylesheet' type='text/css' href='https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.20.1/swagger-ui.css'>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="swagger-ui">
|
||||
Loading...
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script src='https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.20.1/swagger-ui-bundle.js'></script>
|
||||
|
||||
<script>
|
||||
var currentUrl = new URL(window.location.href);
|
||||
var baseUrl = currentUrl.protocol + "//" + currentUrl.host + currentUrl.pathname;
|
||||
|
||||
var swaggerUIOptions = {
|
||||
dom_id: "#swagger-ui",
|
||||
docExpansion: "list",
|
||||
deepLinking: true,
|
||||
filter: true,
|
||||
layout: "BaseLayout",
|
||||
showExtensions: true,
|
||||
showCommonExtensions: true,
|
||||
spec: {
|
||||
"openapi": "3.1.0",
|
||||
"info": {
|
||||
"title": "EDUSEG® Public API",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://api.saladeaula.digital/v2"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/users/{id}": {
|
||||
"patch": {
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "PATCH /users/{id}",
|
||||
"operationId": "patch_reset_users__id__patch",
|
||||
"parameters": [
|
||||
{
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"title": "Id"
|
||||
},
|
||||
"name": "id",
|
||||
"in": "path"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/NewPasswordPayload"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/{id}/emails": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Get user emails",
|
||||
"operationId": "get_emails_users__id__emails_get",
|
||||
"parameters": [
|
||||
{
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"title": "Id"
|
||||
},
|
||||
"name": "id",
|
||||
"in": "path"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/{id}/logs": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Get user logs",
|
||||
"operationId": "get_logs_users__id__logs_get",
|
||||
"parameters": [
|
||||
{
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"title": "Id"
|
||||
},
|
||||
"name": "id",
|
||||
"in": "path"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/{id}/orgs": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Get user orgs",
|
||||
"operationId": "get_orgs_users__id__orgs_get",
|
||||
"parameters": [
|
||||
{
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"title": "Id"
|
||||
},
|
||||
"name": "id",
|
||||
"in": "path"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/enrollments/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Enrollment"
|
||||
],
|
||||
"summary": "GET /enrollments/{id}",
|
||||
"operationId": "get_enrollment_enrollments__id__get",
|
||||
"parameters": [
|
||||
{
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"title": "Id"
|
||||
},
|
||||
"name": "id",
|
||||
"in": "path"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"tags": [
|
||||
"Enrollment"
|
||||
],
|
||||
"summary": "PATCH /enrollments/{id}",
|
||||
"operationId": "cancel_enrollments__id__patch",
|
||||
"parameters": [
|
||||
{
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"title": "Id"
|
||||
},
|
||||
"name": "id",
|
||||
"in": "path"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CancelPayload"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/courses/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Course"
|
||||
],
|
||||
"summary": "GET /courses/{id}",
|
||||
"operationId": "get_course_courses__id__get",
|
||||
"parameters": [
|
||||
{
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"title": "Id"
|
||||
},
|
||||
"name": "id",
|
||||
"in": "path"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Get users",
|
||||
"operationId": "get_users_users_get",
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "POST /users",
|
||||
"description": "Create user",
|
||||
"operationId": "post_user_users_post",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/User"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/enrollments": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Enrollment"
|
||||
],
|
||||
"summary": "GET /enrollments",
|
||||
"operationId": "get_enrollments_enrollments_get",
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"Enrollment"
|
||||
],
|
||||
"summary": "POST /enrollments",
|
||||
"operationId": "enroll_enrollments_post",
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/orders": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Order"
|
||||
],
|
||||
"summary": "GET /orders",
|
||||
"operationId": "get_orders_orders_get",
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/courses": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Course"
|
||||
],
|
||||
"summary": "GET /courses",
|
||||
"operationId": "get_courses_courses_get",
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"Course"
|
||||
],
|
||||
"summary": "POST /courses",
|
||||
"operationId": "post_course_courses_post",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CoursePayload"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"CancelPayload": {
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"const": "CANCELED",
|
||||
"title": "Status",
|
||||
"default": "CANCELED"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"title": "CancelPayload"
|
||||
},
|
||||
"Cert": {
|
||||
"properties": {
|
||||
"exp_interval": {
|
||||
"type": "integer",
|
||||
"title": "Exp Interval"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"exp_interval"
|
||||
],
|
||||
"title": "Cert"
|
||||
},
|
||||
"Course": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"format": "uuid4"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"title": "Id"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"title": "Name"
|
||||
},
|
||||
"cert": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/Cert"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"access_period": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Access Period"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"title": "Course"
|
||||
},
|
||||
"CoursePayload": {
|
||||
"properties": {
|
||||
"course": {
|
||||
"$ref": "#/components/schemas/Course"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"course"
|
||||
],
|
||||
"title": "CoursePayload"
|
||||
},
|
||||
"HTTPValidationError": {
|
||||
"properties": {
|
||||
"detail": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ValidationError"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "Detail"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"title": "HTTPValidationError"
|
||||
},
|
||||
"NewPasswordPayload": {
|
||||
"properties": {
|
||||
"cognito_sub": {
|
||||
"type": "string",
|
||||
"format": "uuid4",
|
||||
"title": "Cognito Sub"
|
||||
},
|
||||
"new_password": {
|
||||
"type": "string",
|
||||
"minLength": 6,
|
||||
"title": "New Password"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"cognito_sub",
|
||||
"new_password"
|
||||
],
|
||||
"title": "NewPasswordPayload"
|
||||
},
|
||||
"User": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"format": "uuid4"
|
||||
},
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"title": "Id"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"format": "name",
|
||||
"title": "Name"
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"title": "Email"
|
||||
},
|
||||
"email_verified": {
|
||||
"type": "boolean",
|
||||
"title": "Email Verified",
|
||||
"default": false
|
||||
},
|
||||
"cpf": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"format": "cpf"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Cpf"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"email"
|
||||
],
|
||||
"title": "User"
|
||||
},
|
||||
"ValidationError": {
|
||||
"properties": {
|
||||
"loc": {
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "integer"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "array",
|
||||
"title": "Location"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"title": "Error Type"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"loc",
|
||||
"msg",
|
||||
"type"
|
||||
],
|
||||
"title": "ValidationError"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
"bearerAuth": {
|
||||
"type": "http",
|
||||
"scheme": "bearer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
},
|
||||
presets: [
|
||||
SwaggerUIBundle.presets.apis,
|
||||
SwaggerUIBundle.SwaggerUIStandalonePreset
|
||||
],
|
||||
plugins: [
|
||||
SwaggerUIBundle.plugins.DownloadUrl
|
||||
],
|
||||
withCredentials: true,
|
||||
persistAuthorization: true,
|
||||
oauth2RedirectUrl: baseUrl + "?format=oauth2-redirect",
|
||||
}
|
||||
|
||||
var ui = SwaggerUIBundle(swaggerUIOptions)
|
||||
ui.specActions.updateUrl(currentUrl.pathname + "?format=json");
|
||||
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user