openapi: 3.1.0 info: title: FastAPI version: 0.1.0 paths: /token: post: tags: - Token summary: Login For Access Token operationId: login_for_access_token_token_post requestBody: content: application/x-www-form-urlencoded: schema: $ref: "#/components/schemas/Body_login_for_access_token_token_post" required: true responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/Token" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" /test/login: get: tags: - Token summary: Test Login operationId: test_login_test_login_get responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/UserDB" security: - OAuth2PasswordBearer: [] /users/: get: tags: - Users summary: Read Users operationId: read_users_users__get responses: "200": description: Successful Response content: application/json: schema: items: $ref: "#/components/schemas/UserResponse" type: array title: Response Read Users Users Get security: - OAuth2PasswordBearer: [] post: tags: - Users summary: Create User operationId: create_user_users__post requestBody: content: application/json: schema: $ref: "#/components/schemas/UserCreate" required: true responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/UserResponse" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" security: - OAuth2PasswordBearer: [] /users/{user_id}: get: tags: - Users summary: Read User operationId: read_user_users__user_id__get security: - OAuth2PasswordBearer: [] parameters: - name: user_id in: path required: true schema: type: integer title: User Id responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/UserResponse" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" patch: tags: - Users summary: Update User operationId: update_user_users__user_id__patch security: - OAuth2PasswordBearer: [] parameters: - name: user_id in: path required: true schema: type: integer title: User Id requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UserUpdate" responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/UserResponse" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" delete: tags: - Users summary: Delete User operationId: delete_user_users__user_id__delete security: - OAuth2PasswordBearer: [] parameters: - name: user_id in: path required: true schema: type: integer title: User Id responses: "200": description: Successful Response content: application/json: schema: {} "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" /groups/: get: tags: - Group summary: Get Groups operationId: get_groups_groups__get responses: "200": description: Successful Response content: application/json: schema: items: $ref: "#/components/schemas/GroupResponse" type: array title: Response Get Groups Groups Get security: - OAuth2PasswordBearer: [] post: tags: - Group summary: Create Group operationId: create_group_groups__post requestBody: content: application/json: schema: $ref: "#/components/schemas/GroupCreate" required: true responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/GroupResponse" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" security: - OAuth2PasswordBearer: [] /groups/{group_id}: delete: tags: - Group summary: Delete Group operationId: delete_group_groups__group_id__delete security: - OAuth2PasswordBearer: [] parameters: - name: group_id in: path required: true schema: type: integer title: Group Id responses: "200": description: Successful Response content: application/json: schema: {} "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" /cards/{group_id}: post: tags: - Card summary: Add Card operationId: add_card_cards__group_id__post security: - OAuth2PasswordBearer: [] parameters: - name: group_id in: path required: true schema: type: integer title: Group Id responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/Card" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" get: tags: - Card summary: Get Cards operationId: get_cards_cards__group_id__get security: - OAuth2PasswordBearer: [] parameters: - name: group_id in: path required: true schema: type: integer title: Group Id responses: "200": description: Successful Response content: application/json: schema: type: array items: $ref: "#/components/schemas/Card" title: Response Get Cards Cards Group Id Get "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" /cards/delete: get: tags: - Card summary: Del Card operationId: del_card_cards_delete_get responses: "200": description: Successful Response content: application/json: schema: {} security: - OAuth2PasswordBearer: [] /aa/: get: tags: - AccessAuth summary: Get All Accessauths operationId: get_all_accessauths_aa__get responses: "200": description: Successful Response content: application/json: schema: items: $ref: "#/components/schemas/AccessAuthorizationResponse" type: array title: Response Get All Accessauths Aa Get security: - OAuth2PasswordBearer: [] post: tags: - AccessAuth summary: Add Accessauth operationId: add_accessauth_aa__post requestBody: content: application/json: schema: $ref: "#/components/schemas/AccessAuthorizationCreate" required: true responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/AccessAuthorizationResponse" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" security: - OAuth2PasswordBearer: [] /aa/{aa_id}: get: tags: - AccessAuth summary: Get One Accessauth operationId: get_one_accessauth_aa__aa_id__get security: - OAuth2PasswordBearer: [] parameters: - name: aa_id in: path required: true schema: type: integer title: Aa Id responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/AccessAuthorizationResponse" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" patch: tags: - AccessAuth summary: Change Accessauth operationId: change_accessauth_aa__aa_id__patch security: - OAuth2PasswordBearer: [] parameters: - name: aa_id in: path required: true schema: type: integer title: Aa Id requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AccessAuthorizationUpdate" responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/AccessAuthorizationResponse" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" delete: tags: - AccessAuth summary: Delete Accessauth operationId: delete_accessauth_aa__aa_id__delete security: - OAuth2PasswordBearer: [] parameters: - name: aa_id in: path required: true schema: type: integer title: Aa Id responses: "200": description: Successful Response content: application/json: schema: {} "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" /aa/assign/{group_id}/{aa_id}: put: tags: - AccessAuth summary: Assign Accessauth operationId: assign_accessauth_aa_assign__group_id___aa_id__put security: - OAuth2PasswordBearer: [] parameters: - name: group_id in: path required: true schema: type: integer title: Group Id - name: aa_id in: path required: true schema: type: integer title: Aa Id responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/GroupResponse" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" /aa/unassign/{group_id}/{aa_id}: put: tags: - AccessAuth summary: Unassign Accessauth operationId: unassign_accessauth_aa_unassign__group_id___aa_id__put security: - OAuth2PasswordBearer: [] parameters: - name: group_id in: path required: true schema: type: integer title: Group Id - name: aa_id in: path required: true schema: type: integer title: Aa Id responses: "200": description: Successful Response content: application/json: schema: $ref: "#/components/schemas/GroupResponse" "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" /door/open: put: tags: - Door summary: Open Door operationId: open_door_door_open_put responses: "200": description: Successful Response content: application/json: schema: {} security: - OAuth2PasswordBearer: [] /door/close: put: tags: - Door summary: Open Door operationId: open_door_door_close_put responses: "200": description: Successful Response content: application/json: schema: {} security: - OAuth2PasswordBearer: [] /door/test: post: tags: - Door summary: Test Access operationId: test_access_door_test_post parameters: - name: input in: query required: true schema: type: string title: Input responses: "200": description: Successful Response content: application/json: schema: {} "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" /debug/addcard/{groupid}/{card_key}: get: tags: - Debug items - maybe dont show this in UI summary: Add Card Manually description: Add cards manually (you also have to delete them manually) operationId: add_card_manually_debug_addcard__groupid___card_key__get security: - OAuth2PasswordBearer: [] parameters: - name: groupid in: path required: true schema: type: integer title: Groupid - name: card_key in: path required: true schema: type: string title: Card Key responses: "200": description: Successful Response content: application/json: schema: {} "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" /debug/rmcard/{card_key}: get: tags: - Debug items - maybe dont show this in UI summary: Remove Card Manually operationId: remove_card_manually_debug_rmcard__card_key__get security: - OAuth2PasswordBearer: [] parameters: - name: card_key in: path required: true schema: type: string title: Card Key responses: "200": description: Successful Response content: application/json: schema: {} "422": description: Validation Error content: application/json: schema: $ref: "#/components/schemas/HTTPValidationError" /debug/getcards: put: tags: - Debug items - maybe dont show this in UI summary: List All Cards operationId: list_all_cards_debug_getcards_put responses: "200": description: Successful Response content: application/json: schema: {} security: - OAuth2PasswordBearer: [] components: schemas: AccessAuthorizationCreate: properties: name: type: string title: Name is_active: type: boolean title: Is Active timetables: items: $ref: "#/components/schemas/TimetableCreate" type: array title: Timetables type: object required: - name - is_active - timetables title: AccessAuthorizationCreate AccessAuthorizationDB: properties: name: type: string title: Name is_active: type: boolean title: Is Active id: type: integer title: Id type: object required: - name - is_active title: AccessAuthorizationDB AccessAuthorizationResponse: properties: name: type: string title: Name is_active: type: boolean title: Is Active id: type: integer title: Id timetables: items: $ref: "#/components/schemas/Timetable" type: array title: Timetables groups: items: $ref: "#/components/schemas/GroupDB" type: array title: Groups type: object required: - name - is_active - id - timetables - groups title: AccessAuthorizationResponse AccessAuthorizationUpdate: properties: name: anyOf: - type: string - type: "null" title: Name is_active: anyOf: - type: boolean - type: "null" title: Is Active timetables: anyOf: - items: $ref: "#/components/schemas/TimetableCreate" type: array - type: "null" title: Timetables type: object title: AccessAuthorizationUpdate Body_login_for_access_token_token_post: properties: grant_type: anyOf: - type: string pattern: ^password$ - type: "null" title: Grant Type username: type: string title: Username password: type: string format: password title: Password scope: type: string title: Scope default: "" client_id: anyOf: - type: string - type: "null" title: Client Id client_secret: anyOf: - type: string - type: "null" format: password title: Client Secret type: object required: - username - password title: Body_login_for_access_token_token_post Card: properties: id: anyOf: - type: integer - type: "null" title: Id uuid: type: string title: Uuid group_id: anyOf: - type: integer - type: "null" title: Group Id type: object required: - uuid title: Card GroupCreate: properties: name: type: string title: Name type: object required: - name title: GroupCreate GroupDB: properties: name: type: string title: Name id: anyOf: - type: integer - type: "null" title: Id type: object required: - name title: GroupDB GroupResponse: properties: name: type: string title: Name id: type: integer title: Id cards: anyOf: - items: $ref: "#/components/schemas/Card" type: array - type: "null" title: Cards accessauths: anyOf: - items: $ref: "#/components/schemas/AccessAuthorizationDB" type: array - type: "null" title: Accessauths type: object required: - name - id - cards - accessauths title: GroupResponse HTTPValidationError: properties: detail: items: $ref: "#/components/schemas/ValidationError" type: array title: Detail type: object title: HTTPValidationError Timetable: properties: weekday: type: integer maximum: 6 minimum: 0 title: Weekday starttime: type: string format: time title: Starttime duration: type: integer exclusiveMaximum: 1440 exclusiveMinimum: 0 title: Duration id: anyOf: - type: integer - type: "null" title: Id accessauth_id: type: integer title: Accessauth Id type: object required: - weekday - starttime - duration title: Timetable TimetableCreate: properties: weekday: type: integer maximum: 6 minimum: 0 title: Weekday starttime: type: string format: time title: Starttime duration: type: integer exclusiveMaximum: 1440 exclusiveMinimum: 0 title: Duration type: object required: - weekday - starttime - duration title: TimetableCreate Token: properties: access_token: type: string title: Access Token token_type: type: string title: Token Type type: object required: - access_token - token_type title: Token UserCreate: properties: name: type: string title: Name email: anyOf: - type: string - type: "null" title: Email is_admin: type: boolean title: Is Admin default: false password: type: string title: Password type: object required: - name - password title: UserCreate UserDB: properties: name: type: string title: Name email: anyOf: - type: string - type: "null" title: Email is_admin: type: boolean title: Is Admin default: false id: anyOf: - type: integer - type: "null" title: Id passwordhash: type: string title: Passwordhash type: object required: - name - passwordhash title: UserDB UserResponse: properties: name: type: string title: Name email: anyOf: - type: string - type: "null" title: Email is_admin: type: boolean title: Is Admin default: false id: type: integer title: Id type: object required: - name - id title: UserResponse UserUpdate: properties: name: anyOf: - type: string - type: "null" title: Name email: anyOf: - type: string - type: "null" title: Email is_admin: anyOf: - type: boolean - type: "null" title: Is Admin password: anyOf: - type: string - type: "null" title: Password type: object title: UserUpdate ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError securitySchemes: OAuth2PasswordBearer: type: oauth2 flows: password: scopes: {} tokenUrl: token