openapi: 3.1.0 info: title: FastAPI version: 0.1.0 servers: - url: / paths: /api/v1/token: post: operationId: login_for_access_token_api_v1_token_post requestBody: content: application/x-www-form-urlencoded: schema: $ref: "#/components/schemas/Body_login_for_access_token_api_v1_token_post" required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/Token" description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error summary: Login For Access Token tags: - Token /api/v1/test/login: get: operationId: test_login_api_v1_test_login_get responses: "200": content: application/json: schema: $ref: "#/components/schemas/UserDB" description: Successful Response security: - OAuth2PasswordBearer: [] summary: Test Login tags: - Token /api/v1/users/: get: operationId: read_users_api_v1_users__get responses: "200": content: application/json: schema: items: $ref: "#/components/schemas/UserResponse" title: Response Read Users Api V1 Users Get type: array default: null description: Successful Response security: - OAuth2PasswordBearer: [] summary: Read Users tags: - Users post: operationId: create_user_api_v1_users__post requestBody: content: application/json: schema: $ref: "#/components/schemas/UserCreate" required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/UserResponse" description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Create User tags: - Users /api/v1/users/current: get: operationId: get_current_user_api_v1_users_current_get responses: "200": content: application/json: schema: $ref: "#/components/schemas/UserResponse" description: Successful Response security: - OAuth2PasswordBearer: [] summary: Get Current User tags: - Users /api/v1/users/{user_id}: delete: operationId: delete_user_api_v1_users__user_id__delete parameters: - explode: false in: path name: user_id required: true schema: title: User Id type: integer style: simple responses: "200": content: application/json: schema: {} description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Delete User tags: - Users get: operationId: read_user_api_v1_users__user_id__get parameters: - explode: false in: path name: user_id required: true schema: title: User Id type: integer style: simple responses: "200": content: application/json: schema: $ref: "#/components/schemas/UserResponse" description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Read User tags: - Users patch: operationId: update_user_api_v1_users__user_id__patch parameters: - explode: false in: path name: user_id required: true schema: title: User Id type: integer style: simple requestBody: content: application/json: schema: $ref: "#/components/schemas/UserUpdate" required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/UserResponse" description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Update User tags: - Users /api/v1/groups/: get: operationId: get_groups_api_v1_groups__get responses: "200": content: application/json: schema: items: $ref: "#/components/schemas/GroupResponse" title: Response Get Groups Api V1 Groups Get type: array default: null description: Successful Response security: - OAuth2PasswordBearer: [] summary: Get Groups tags: - Group post: operationId: create_group_api_v1_groups__post requestBody: content: application/json: schema: $ref: "#/components/schemas/GroupCreate" required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/GroupResponse" description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Create Group tags: - Group /api/v1/groups/{group_id}: delete: operationId: delete_group_api_v1_groups__group_id__delete parameters: - explode: false in: path name: group_id required: true schema: title: Group Id type: integer style: simple responses: "200": content: application/json: schema: {} description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Delete Group tags: - Group /api/v1/cards/{group_id}: get: operationId: get_cards_api_v1_cards__group_id__get parameters: - explode: false in: path name: group_id required: true schema: title: Group Id type: integer style: simple responses: "200": content: application/json: schema: items: $ref: "#/components/schemas/Card" title: Response Get Cards Api V1 Cards Group Id Get type: array default: null description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Get Cards tags: - Card post: operationId: add_card_api_v1_cards__group_id__post parameters: - explode: false in: path name: group_id required: true schema: title: Group Id type: integer style: simple responses: "200": content: application/json: schema: $ref: "#/components/schemas/Card" description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Add Card tags: - Card /api/v1/cards/delete: get: operationId: del_card_api_v1_cards_delete_get responses: "200": content: application/json: schema: {} description: Successful Response security: - OAuth2PasswordBearer: [] summary: Del Card tags: - Card /api/v1/aa/: get: operationId: get_all_accessauths_api_v1_aa__get responses: "200": content: application/json: schema: items: $ref: "#/components/schemas/AccessAuthorizationResponse" title: Response Get All Accessauths Api V1 Aa Get type: array default: null description: Successful Response security: - OAuth2PasswordBearer: [] summary: Get All Accessauths tags: - AccessAuth post: operationId: add_accessauth_api_v1_aa__post requestBody: content: application/json: schema: $ref: "#/components/schemas/AccessAuthorizationCreate" required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/AccessAuthorizationResponse" description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Add Accessauth tags: - AccessAuth /api/v1/aa/{aa_id}: delete: operationId: delete_accessauth_api_v1_aa__aa_id__delete parameters: - explode: false in: path name: aa_id required: true schema: title: Aa Id type: integer style: simple responses: "200": content: application/json: schema: {} description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Delete Accessauth tags: - AccessAuth get: operationId: get_one_accessauth_api_v1_aa__aa_id__get parameters: - explode: false in: path name: aa_id required: true schema: title: Aa Id type: integer style: simple responses: "200": content: application/json: schema: $ref: "#/components/schemas/AccessAuthorizationResponse" description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Get One Accessauth tags: - AccessAuth patch: operationId: change_accessauth_api_v1_aa__aa_id__patch parameters: - explode: false in: path name: aa_id required: true schema: title: Aa Id type: integer style: simple requestBody: content: application/json: schema: $ref: "#/components/schemas/AccessAuthorizationUpdate" required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/AccessAuthorizationResponse" description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Change Accessauth tags: - AccessAuth /api/v1/aa/assign/{group_id}/{aa_id}: put: operationId: assign_accessauth_api_v1_aa_assign__group_id___aa_id__put parameters: - explode: false in: path name: group_id required: true schema: title: Group Id type: integer style: simple - explode: false in: path name: aa_id required: true schema: title: Aa Id type: integer style: simple responses: "200": content: application/json: schema: $ref: "#/components/schemas/GroupResponse" description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Assign Accessauth tags: - AccessAuth /api/v1/aa/unassign/{group_id}/{aa_id}: put: operationId: unassign_accessauth_api_v1_aa_unassign__group_id___aa_id__put parameters: - explode: false in: path name: group_id required: true schema: title: Group Id type: integer style: simple - explode: false in: path name: aa_id required: true schema: title: Aa Id type: integer style: simple responses: "200": content: application/json: schema: $ref: "#/components/schemas/GroupResponse" description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Unassign Accessauth tags: - AccessAuth /api/v1/door/open: put: operationId: open_door_api_v1_door_open_put responses: "200": content: application/json: schema: {} description: Successful Response security: - OAuth2PasswordBearer: [] summary: Open Door tags: - Door /api/v1/door/close: put: operationId: open_door_api_v1_door_close_put responses: "200": content: application/json: schema: {} description: Successful Response security: - OAuth2PasswordBearer: [] summary: Open Door tags: - Door /api/v1/door/test: post: operationId: test_access_api_v1_door_test_post parameters: - explode: true in: query name: input required: true schema: title: Input type: string style: form responses: "200": content: application/json: schema: {} description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error summary: Test Access tags: - Door /api/v1/debug/addcard/{groupid}/{card_key}: get: description: Add cards manually (you also have to delete them manually) operationId: add_card_manually_api_v1_debug_addcard__groupid___card_key__get parameters: - explode: false in: path name: groupid required: true schema: title: Groupid type: integer style: simple - explode: false in: path name: card_key required: true schema: title: Card Key type: string style: simple responses: "200": content: application/json: schema: {} description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Add Card Manually tags: - Debug items - maybe dont show this in UI /api/v1/debug/rmcard/{card_key}: get: operationId: remove_card_manually_api_v1_debug_rmcard__card_key__get parameters: - explode: false in: path name: card_key required: true schema: title: Card Key type: string style: simple responses: "200": content: application/json: schema: {} description: Successful Response "422": content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" description: Validation Error security: - OAuth2PasswordBearer: [] summary: Remove Card Manually tags: - Debug items - maybe dont show this in UI /api/v1/debug/getcards: put: operationId: list_all_cards_api_v1_debug_getcards_put responses: "200": content: application/json: schema: {} description: Successful Response security: - OAuth2PasswordBearer: [] summary: List All Cards tags: - Debug items - maybe dont show this in UI components: schemas: AccessAuthorizationCreate: example: name: name is_active: true timetables: - weekday: 0 starttime: starttime duration: 867 - weekday: 0 starttime: starttime duration: 867 properties: name: title: Name type: string is_active: title: Is Active type: boolean timetables: items: $ref: "#/components/schemas/TimetableCreate" title: Timetables type: array default: null required: - is_active - name - timetables title: AccessAuthorizationCreate AccessAuthorizationDB: example: name: name is_active: true id: 5 properties: name: title: Name type: string is_active: title: Is Active type: boolean id: nullable: true type: integer required: - is_active - name title: AccessAuthorizationDB AccessAuthorizationResponse: example: name: name is_active: true id: 0 timetables: - weekday: 3 starttime: starttime duration: 211 id: 5 accessauth_id: 5 - weekday: 3 starttime: starttime duration: 211 id: 5 accessauth_id: 5 groups: - name: name id: 2 - name: name id: 2 properties: name: title: Name type: string is_active: title: Is Active type: boolean id: title: Id type: integer timetables: items: $ref: "#/components/schemas/Timetable" title: Timetables type: array default: null groups: items: $ref: "#/components/schemas/GroupDB" title: Groups type: array default: null required: - groups - id - is_active - name - timetables title: AccessAuthorizationResponse AccessAuthorizationUpdate: example: name: name is_active: true timetables: - weekday: 0 starttime: starttime duration: 867 - weekday: 0 starttime: starttime duration: 867 properties: name: nullable: true type: string is_active: nullable: true type: boolean timetables: items: $ref: "#/components/schemas/TimetableCreate" nullable: true type: array default: null title: AccessAuthorizationUpdate Body_login_for_access_token_api_v1_token_post: properties: grant_type: nullable: true pattern: ^password$ type: string username: title: Username type: string password: format: password title: Password type: string scope: default: "" title: Scope type: string client_id: nullable: true type: string client_secret: nullable: true type: string required: - password - username title: Body_login_for_access_token_api_v1_token_post Card: example: id: 6 uuid: uuid group_id: 1 properties: id: nullable: true type: integer uuid: title: Uuid type: string group_id: nullable: true type: integer required: - uuid title: Card GroupCreate: example: name: name properties: name: title: Name type: string required: - name title: GroupCreate GroupDB: example: name: name id: 2 properties: name: title: Name type: string id: nullable: true type: integer required: - name title: GroupDB GroupResponse: example: name: name id: 0 cards: - id: 6 uuid: uuid group_id: 1 - id: 6 uuid: uuid group_id: 1 accessauths: - name: name is_active: true id: 5 - name: name is_active: true id: 5 properties: name: title: Name type: string id: title: Id type: integer cards: items: $ref: "#/components/schemas/Card" nullable: true type: array default: null accessauths: items: $ref: "#/components/schemas/AccessAuthorizationDB" nullable: true type: array default: null required: - accessauths - cards - id - name title: GroupResponse HTTPValidationError: example: detail: - loc: - Location_inner - Location_inner msg: msg type: type input: "" ctx: "{}" - loc: - Location_inner - Location_inner msg: msg type: type input: "" ctx: "{}" properties: detail: items: $ref: "#/components/schemas/ValidationError" title: Detail type: array default: null title: HTTPValidationError Timetable: example: weekday: 3 starttime: starttime duration: 211 id: 5 accessauth_id: 5 properties: weekday: maximum: 6.0 minimum: 0.0 title: Weekday type: integer starttime: format: time title: Starttime type: string duration: exclusiveMaximum: true exclusiveMinimum: true maximum: 1440.0 minimum: 0.0 title: Duration type: integer id: nullable: true type: integer accessauth_id: title: Accessauth Id type: integer required: - duration - starttime - weekday title: Timetable TimetableCreate: example: weekday: 0 starttime: starttime duration: 867 properties: weekday: maximum: 6.0 minimum: 0.0 title: Weekday type: integer starttime: format: time title: Starttime type: string duration: exclusiveMaximum: true exclusiveMinimum: true maximum: 1440.0 minimum: 0.0 title: Duration type: integer required: - duration - starttime - weekday title: TimetableCreate Token: example: access_token: access_token token_type: token_type properties: access_token: title: Access Token type: string token_type: title: Token Type type: string required: - access_token - token_type title: Token UserCreate: example: name: name email: email is_admin: false password: password properties: name: title: Name type: string email: nullable: true type: string is_admin: default: false title: Is Admin type: boolean password: title: Password type: string required: - name - password title: UserCreate UserDB: example: name: name email: email is_admin: false id: 0 passwordhash: passwordhash properties: name: title: Name type: string email: nullable: true type: string is_admin: default: false title: Is Admin type: boolean id: nullable: true type: integer passwordhash: title: Passwordhash type: string required: - name - passwordhash title: UserDB UserResponse: example: name: name email: email is_admin: false id: 0 properties: name: title: Name type: string email: nullable: true type: string is_admin: default: false title: Is Admin type: boolean id: title: Id type: integer required: - id - name title: UserResponse UserUpdate: example: name: name email: email is_admin: true password: password properties: name: nullable: true type: string email: nullable: true type: string is_admin: nullable: true type: boolean password: nullable: true type: string title: UserUpdate ValidationError: example: loc: - Location_inner - Location_inner msg: msg type: type input: "" ctx: "{}" properties: loc: items: $ref: "#/components/schemas/Location_inner" title: Location type: array default: null msg: title: Message type: string type: title: Error Type type: string input: title: Input ctx: title: Context type: object required: - loc - msg - type title: ValidationError Location_inner: anyOf: - type: string - type: integer securitySchemes: OAuth2PasswordBearer: flows: password: scopes: {} tokenUrl: /api/v1/token type: oauth2