Commit 1efbe1aa authored by Tobias Kallauke's avatar Tobias Kallauke
Browse files

Add protyp-API swagger docs

parent 768173d8
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/groups/":{"get":{"tags":["group"],"summary":"List Groups","operationId":"list_groups_groups__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupList"}}}}}},"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/Group"}}}},"404":{"description":"Group not found"},"409":{"description":"Group name already exists"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups/{id}":{"get":{"tags":["group"],"summary":"Get Group","operationId":"get_group_groups__id__get","parameters":[{"required":true,"schema":{"title":"Id","type":"integer"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupGet"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["group"],"summary":"Update Group","operationId":"update_group_groups__id__post","parameters":[{"required":true,"schema":{"title":"Id","type":"integer"},"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups/{id}/members":{"get":{"tags":["group"],"summary":"List Members","operationId":"list_members_groups__id__members_get","parameters":[{"required":true,"schema":{"title":"Id","type":"integer"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Members Groups Id Members Get","type":"array","items":{"$ref":"#/components/schemas/GroupMember"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["group"],"summary":"Add Members","operationId":"add_members_groups__id__members_post","parameters":[{"required":true,"schema":{"title":"Id","type":"integer"},"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupMemberAdd"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["group"],"summary":"Delete Members","operationId":"delete_members_groups__id__members_delete","parameters":[{"required":true,"schema":{"title":"Id","type":"integer"},"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_delete_members_groups__id__members_delete"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups/{id}/consumers":{"get":{"tags":["group"],"summary":"List Consumers","operationId":"list_consumers_groups__id__consumers_get","parameters":[{"required":true,"schema":{"title":"Id","type":"integer"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupConsumerList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups/{id}/permissions":{"get":{"tags":["group"],"summary":"Get Permissions","operationId":"get_permissions_groups__id__permissions_get","parameters":[{"required":true,"schema":{"title":"Id","type":"integer"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupPermissionList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["group"],"summary":"Add Permissions","operationId":"add_permissions_groups__id__permissions_post","parameters":[{"required":true,"schema":{"title":"Id","type":"integer"},"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionAddList"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups/{group}/consumers/{consumer}/config":{"get":{"tags":["group"],"summary":"Get Config","operationId":"get_config_groups__group__consumers__consumer__config_get","parameters":[{"required":true,"schema":{"title":"Group","type":"integer"},"name":"group","in":"path"},{"required":true,"schema":{"title":"Consumer","type":"integer"},"name":"consumer","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Config Groups Group Consumers Consumer Config Get","type":"array","items":{"$ref":"#/components/schemas/ConfigValue"}}}}},"404":{"description":"Group or Consumer not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["group"],"summary":"Set Config Value","description":"Sets or updates a config value","operationId":"set_config_value_groups__group__consumers__consumer__config_post","parameters":[{"required":true,"schema":{"title":"Group","type":"integer"},"name":"group","in":"path"},{"required":true,"schema":{"title":"Consumer","type":"integer"},"name":"consumer","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigValueSetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Group or Consumer/Parameter not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups/{group}/consumers/{consumer}/config/{parameter}":{"delete":{"tags":["group"],"summary":"Delete Config Value","description":"Deletes a set config value","operationId":"delete_config_value_groups__group__consumers__consumer__config__parameter__delete","parameters":[{"required":true,"schema":{"title":"Group","type":"integer"},"name":"group","in":"path"},{"required":true,"schema":{"title":"Consumer","type":"integer"},"name":"consumer","in":"path"},{"required":true,"schema":{"title":"Parameter","type":"integer"},"name":"parameter","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Config Parameter not found or not set for this group"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/consumers/":{"get":{"tags":["consumer"],"summary":"List Consumers","operationId":"list_consumers_consumers__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumerListResult"}}}}}}},"/consumers/capabilities/{id}":{"get":{"tags":["consumer"],"summary":"List Consumer Capabilities","operationId":"list_consumer_capabilities_consumers_capabilities__id__get","parameters":[{"required":true,"schema":{"title":"Id","type":"integer"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsumerCapabilityResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/list":{"post":{"tags":["user"],"summary":"List Users","operationId":"list_users_users_list_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserQuery"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response List Users Users List Post","type":"array","items":{"type":"string"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{id}/groups":{"get":{"tags":["user"],"summary":"Get Groups","operationId":"get_groups_users__id__groups_get","parameters":[{"required":true,"schema":{"title":"Id","type":"integer"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_delete_members_groups__id__members_delete":{"title":"Body_delete_members_groups__id__members_delete","type":"object","properties":{"users":{"title":"Users","type":"array","items":{"type":"integer"},"default":[]},"memberships":{"title":"Memberships","type":"array","items":{"type":"integer"},"default":[]}}},"Capability":{"title":"Capability","required":["name","description","id"],"type":"object","properties":{"name":{"title":"Name","type":"string"},"description":{"title":"Description","type":"string"},"id":{"title":"Id","type":"integer"}}},"ConfigParameterType":{"title":"ConfigParameterType","enum":["string","bool"],"description":"An enumeration."},"ConfigValue":{"title":"ConfigValue","required":["parameter_id","name","type"],"type":"object","properties":{"parameter_id":{"title":"Parameter Id","type":"integer"},"name":{"title":"Name","type":"string"},"type":{"$ref":"#/components/schemas/ConfigParameterType"},"format":{"title":"Format","type":"string"},"default":{"title":"Default","type":"string"},"value":{"title":"Value","type":"string"}}},"ConfigValueSetRequest":{"title":"ConfigValueSetRequest","required":["parameter","value"],"type":"object","properties":{"parameter":{"title":"Parameter","type":"integer"},"value":{"title":"Value","type":"string"}}},"ConsumerCapabilityList":{"title":"ConsumerCapabilityList","required":["capabilities"],"type":"object","properties":{"capabilities":{"title":"Capabilities","type":"array","items":{"$ref":"#/components/schemas/Capability"}}}},"ConsumerCapabilityResult":{"title":"ConsumerCapabilityResult","required":["result"],"type":"object","properties":{"result":{"$ref":"#/components/schemas/ConsumerCapabilityList"}}},"ConsumerEntry":{"title":"ConsumerEntry","required":["id","key","super_key"],"type":"object","properties":{"application":{"title":"Application","type":"string"},"description":{"title":"Description","type":"string"},"id":{"title":"Id","type":"integer"},"key":{"title":"Key","type":"string"},"super_key":{"title":"Super Key","type":"boolean"}}},"ConsumerList":{"title":"ConsumerList","required":["consumers"],"type":"object","properties":{"consumers":{"title":"Consumers","type":"array","items":{"$ref":"#/components/schemas/ConsumerEntry"}}}},"ConsumerListResult":{"title":"ConsumerListResult","required":["result"],"type":"object","properties":{"result":{"$ref":"#/components/schemas/ConsumerList"}}},"Group":{"title":"Group","required":["name","description","id","created_at"],"type":"object","properties":{"name":{"title":"Name","type":"string"},"description":{"title":"Description","type":"string"},"id":{"title":"Id","type":"integer"},"created_at":{"title":"Created At","type":"string","format":"date-time"}}},"GroupConsumer":{"title":"GroupConsumer","required":["application","capabilities","description","id","uri"],"type":"object","properties":{"application":{"title":"Application","type":"string"},"capabilities":{"title":"Capabilities","type":"array","items":{"$ref":"#/components/schemas/Capability"}},"description":{"title":"Description","type":"string"},"id":{"title":"Id","type":"integer"},"uri":{"title":"Uri","type":"string"}}},"GroupConsumerList":{"title":"GroupConsumerList","required":["consumers"],"type":"object","properties":{"consumers":{"title":"Consumers","type":"array","items":{"$ref":"#/components/schemas/GroupConsumer"}}}},"GroupCreate":{"title":"GroupCreate","required":["name","description"],"type":"object","properties":{"name":{"title":"Name","type":"string"},"description":{"title":"Description","type":"string"}}},"GroupGet":{"title":"GroupGet","required":["group_id"],"type":"object","properties":{"group_id":{"$ref":"#/components/schemas/Group"}}},"GroupList":{"title":"GroupList","required":["groups"],"type":"object","properties":{"groups":{"title":"Groups","type":"array","items":{"$ref":"#/components/schemas/Group"}}}},"GroupMember":{"title":"GroupMember","required":["id","login"],"type":"object","properties":{"capability":{"$ref":"#/components/schemas/Capability"},"id":{"title":"Id","type":"integer"},"login":{"title":"Login","type":"string"}}},"GroupMemberAdd":{"title":"GroupMemberAdd","required":["users"],"type":"object","properties":{"users":{"title":"Users","type":"array","items":{"$ref":"#/components/schemas/GroupMemberAddEntry"}}}},"GroupMemberAddEntry":{"title":"GroupMemberAddEntry","required":["id"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"capability":{"title":"Capability","type":"integer"}}},"GroupPermission":{"title":"GroupPermission","required":["id","permission","user"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"permission":{"title":"Permission","type":"integer"},"user":{"$ref":"#/components/schemas/User"}}},"GroupPermissionList":{"title":"GroupPermissionList","required":["group_permissions"],"type":"object","properties":{"group_permissions":{"title":"Group Permissions","type":"array","items":{"$ref":"#/components/schemas/GroupPermission"}}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"PermissionAddEntry":{"title":"PermissionAddEntry","required":["user_id","permission"],"type":"object","properties":{"user_id":{"title":"User Id","type":"integer"},"permission":{"title":"Permission","type":"integer"}}},"PermissionAddList":{"title":"PermissionAddList","required":["permissions"],"type":"object","properties":{"permissions":{"title":"Permissions","type":"array","items":{"$ref":"#/components/schemas/PermissionAddEntry"}}}},"User":{"title":"User","required":["login","id"],"type":"object","properties":{"login":{"title":"Login","type":"string"},"id":{"title":"Id","type":"integer"}}},"UserQuery":{"title":"UserQuery","required":["logins"],"type":"object","properties":{"logins":{"title":"Logins","type":"array","items":{"type":"string"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment