-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopenapi.json
More file actions
1 lines (1 loc) · 16 KB
/
openapi.json
File metadata and controls
1 lines (1 loc) · 16 KB
1
{"components":{"responses":{"errors":{"content":{"application/vnd.api+json":{"schema":{"$ref":"#/components/schemas/errors"}}},"description":"General Error"}},"schemas":{"error":{"additionalProperties":false,"properties":{"code":{"description":"An application-specific error code, expressed as a string value.","type":"string","x-struct":null,"x-validate":null},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string","x-struct":null,"x-validate":null},"id":{"description":"A unique identifier for this particular occurrence of the problem.","type":"string","x-struct":null,"x-validate":null},"links":{"$ref":"#/components/schemas/links"},"source":{"properties":{"parameter":{"description":"A string indicating which query parameter caused the error.","type":"string","x-struct":null,"x-validate":null},"pointer":{"description":"A JSON Pointer [RFC6901] to the associated entity in the request document [e.g. \"/data\" for a primary data object, or \"/data/attributes/title\" for a specific attribute].","type":"string","x-struct":null,"x-validate":null}},"type":"object","x-struct":null,"x-validate":null},"status":{"description":"The HTTP status code applicable to this problem, expressed as a string value.","type":"string","x-struct":null,"x-validate":null},"title":{"description":"A short, human-readable summary of the problem. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.","type":"string","x-struct":null,"x-validate":null}},"type":"object","x-struct":null,"x-validate":null},"errors":{"items":{"$ref":"#/components/schemas/error"},"type":"array","uniqueItems":true,"x-struct":null,"x-validate":null},"link":{"description":"A link MUST be represented as either: a string containing the link's URL or a link object.","type":"string","x-struct":null,"x-validate":null},"links":{"additionalProperties":{"$ref":"#/components/schemas/link"},"type":"object","x-struct":null,"x-validate":null},"post":{"additionalProperties":false,"description":"A \"Resource object\" representing a post","properties":{"attributes":{"additionalProperties":false,"description":"An attributes object for a post","properties":{},"type":"object","x-struct":null,"x-validate":null},"id":{"type":"string"},"relationships":{"additionalProperties":false,"description":"A relationships object for a post","properties":{},"type":"object","x-struct":null,"x-validate":null},"type":{"type":"string","x-struct":null,"x-validate":null}},"required":["type","id"],"type":"object","x-struct":null,"x-validate":null},"post-filter":{"additionalProperties":false,"description":"Filters the query to results matching the given filter object","example":"","properties":{"and":{"items":{"$ref":"#/components/schemas/post-filter"},"type":"array","uniqueItems":true,"x-struct":null,"x-validate":null},"id":{"$ref":"#/components/schemas/post-filter-id"},"not":{"$ref":"#/components/schemas/post-filter"},"or":{"items":{"$ref":"#/components/schemas/post-filter"},"type":"array","uniqueItems":true,"x-struct":null,"x-validate":null}},"type":"deepObject","x-struct":null,"x-validate":null},"post-filter-id":{"additionalProperties":false,"properties":{"eq":{"format":"uuid","type":"string","x-struct":null,"x-validate":null},"greater_than":{"format":"uuid","type":"string","x-struct":null,"x-validate":null},"greater_than_or_equal":{"format":"uuid","type":"string","x-struct":null,"x-validate":null},"in":{"items":{"format":"uuid","type":"string","x-struct":null,"x-validate":null},"type":"array","x-struct":null,"x-validate":null},"is_distinct_from":{"type":"string","x-struct":null,"x-validate":null},"is_nil":{"type":"boolean","x-struct":null,"x-validate":null},"is_not_distinct_from":{"type":"string","x-struct":null,"x-validate":null},"less_than":{"format":"uuid","type":"string","x-struct":null,"x-validate":null},"less_than_or_equal":{"format":"uuid","type":"string","x-struct":null,"x-validate":null},"not_eq":{"format":"uuid","type":"string","x-struct":null,"x-validate":null}},"type":"object","x-struct":null,"x-validate":null},"user":{"additionalProperties":false,"description":"A \"Resource object\" representing a user","properties":{"attributes":{"additionalProperties":false,"description":"An attributes object for a user","properties":{"email":{"description":"Field included by default.","type":"string","x-struct":null,"x-validate":null}},"required":["email"],"type":"object","x-struct":null,"x-validate":null},"id":{"type":"string"},"relationships":{"additionalProperties":false,"description":"A relationships object for a user","properties":{},"type":"object","x-struct":null,"x-validate":null},"type":{"type":"string","x-struct":null,"x-validate":null}},"required":["type","id"],"type":"object","x-struct":null,"x-validate":null},"user-filter":{"additionalProperties":false,"description":"Filters the query to results matching the given filter object","example":"","properties":{"and":{"items":{"$ref":"#/components/schemas/user-filter"},"type":"array","uniqueItems":true,"x-struct":null,"x-validate":null},"email":{"$ref":"#/components/schemas/user-filter-email"},"id":{"$ref":"#/components/schemas/user-filter-id"},"not":{"$ref":"#/components/schemas/user-filter"},"or":{"items":{"$ref":"#/components/schemas/user-filter"},"type":"array","uniqueItems":true,"x-struct":null,"x-validate":null}},"type":"deepObject","x-struct":null,"x-validate":null},"user-filter-email":{"additionalProperties":false,"properties":{"contains":{"type":"string","x-struct":null,"x-validate":null},"eq":{"type":"string","x-struct":null,"x-validate":null},"greater_than":{"type":"string","x-struct":null,"x-validate":null},"greater_than_or_equal":{"type":"string","x-struct":null,"x-validate":null},"in":{"items":{"type":"string","x-struct":null,"x-validate":null},"type":"array","x-struct":null,"x-validate":null},"is_distinct_from":{"type":"string","x-struct":null,"x-validate":null},"is_nil":{"type":"boolean","x-struct":null,"x-validate":null},"is_not_distinct_from":{"type":"string","x-struct":null,"x-validate":null},"less_than":{"type":"string","x-struct":null,"x-validate":null},"less_than_or_equal":{"type":"string","x-struct":null,"x-validate":null},"not_eq":{"type":"string","x-struct":null,"x-validate":null}},"type":"object","x-struct":null,"x-validate":null},"user-filter-id":{"additionalProperties":false,"properties":{"eq":{"format":"uuid","type":"string","x-struct":null,"x-validate":null},"greater_than":{"format":"uuid","type":"string","x-struct":null,"x-validate":null},"greater_than_or_equal":{"format":"uuid","type":"string","x-struct":null,"x-validate":null},"in":{"items":{"format":"uuid","type":"string","x-struct":null,"x-validate":null},"type":"array","x-struct":null,"x-validate":null},"is_distinct_from":{"type":"string","x-struct":null,"x-validate":null},"is_nil":{"type":"boolean","x-struct":null,"x-validate":null},"is_not_distinct_from":{"type":"string","x-struct":null,"x-validate":null},"less_than":{"format":"uuid","type":"string","x-struct":null,"x-validate":null},"less_than_or_equal":{"format":"uuid","type":"string","x-struct":null,"x-validate":null},"not_eq":{"format":"uuid","type":"string","x-struct":null,"x-validate":null}},"type":"object","x-struct":null,"x-validate":null}},"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"JWT for bearer authentication","scheme":"bearer","type":"http"}}},"info":{"title":"AshBaseTemplate JSON API","version":"0.1.44"},"openapi":"3.0.0","paths":{"/posts":{"get":{"callbacks":{},"deprecated":false,"description":"/posts operation on post resource","parameters":[{"description":"Filters the query to results with attributes matching the given filter object","in":"query","name":"filter","required":false,"schema":{"$ref":"#/components/schemas/post-filter"},"style":"deepObject"},{"description":"Sort order to apply to the results","explode":false,"in":"query","name":"sort","required":false,"schema":{"pattern":"^(id|-id|\\+\\+id|--id)(,(id|-id|\\+\\+id|--id))*$","type":"string","x-struct":null,"x-validate":null},"style":"form"},{"description":"Relationship paths to include in the response","explode":false,"in":"query","name":"include","required":false,"schema":{"pattern":"^()(,())*$","type":"string","x-struct":null,"x-validate":null},"style":"form"},{"description":"Limits the response fields to only those listed for each type","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"example":{"post":"id"},"properties":{"post":{"description":"Comma separated field names for post","example":"id","type":"string","x-struct":null,"x-validate":null}},"type":"object","x-struct":null,"x-validate":null},"style":"deepObject"}],"responses":{"200":{"content":{"application/vnd.api+json":{"schema":{"additionalProperties":false,"properties":{"data":{"description":"An array of resource objects representing a post","items":{"$ref":"#/components/schemas/post"},"type":"array","uniqueItems":true,"x-struct":null,"x-validate":null},"included":{"items":{"oneOf":[],"x-struct":null,"x-validate":null},"type":"array","uniqueItems":true,"x-struct":null,"x-validate":null},"meta":{"additionalProperties":true,"type":"object","x-struct":null,"x-validate":null}},"type":"object","x-struct":null,"x-validate":null}}},"description":"Success"},"default":{"$ref":"#/components/responses/errors"}},"tags":["post"]}},"/posts/{id}":{"delete":{"callbacks":{},"deprecated":false,"description":"/posts/:id operation on post resource","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","x-struct":null,"x-validate":null},"style":"form"},{"description":"Relationship paths to include in the response","explode":false,"in":"query","name":"include","required":false,"schema":{"pattern":"^()(,())*$","type":"string","x-struct":null,"x-validate":null},"style":"form"},{"description":"Limits the response fields to only those listed for each type","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"example":{"post":"id"},"properties":{"post":{"description":"Comma separated field names for post","example":"id","type":"string","x-struct":null,"x-validate":null}},"type":"object","x-struct":null,"x-validate":null},"style":"deepObject"}],"responses":{"200":{"description":"Deleted successfully"},"default":{"$ref":"#/components/responses/errors"}},"tags":["post"]},"get":{"callbacks":{},"deprecated":false,"description":"/posts/:id operation on post resource","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string","x-struct":null,"x-validate":null},"style":"form"},{"description":"Relationship paths to include in the response","explode":false,"in":"query","name":"include","required":false,"schema":{"pattern":"^()(,())*$","type":"string","x-struct":null,"x-validate":null},"style":"form"},{"description":"Limits the response fields to only those listed for each type","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"example":{"post":"id"},"properties":{"post":{"description":"Comma separated field names for post","example":"id","type":"string","x-struct":null,"x-validate":null}},"type":"object","x-struct":null,"x-validate":null},"style":"deepObject"}],"responses":{"200":{"content":{"application/vnd.api+json":{"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/post"},"included":{"items":{"oneOf":[],"x-struct":null,"x-validate":null},"type":"array","uniqueItems":true,"x-struct":null,"x-validate":null},"meta":{"additionalProperties":true,"type":"object","x-struct":null,"x-validate":null}},"x-struct":null,"x-validate":null}}},"description":"Success"},"default":{"$ref":"#/components/responses/errors"}},"tags":["post"]},"patch":{"callbacks":{},"deprecated":false,"description":"/posts/:id operation on post resource","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","x-struct":null,"x-validate":null},"style":"form"},{"description":"Relationship paths to include in the response","explode":false,"in":"query","name":"include","required":false,"schema":{"pattern":"^()(,())*$","type":"string","x-struct":null,"x-validate":null},"style":"form"},{"description":"Limits the response fields to only those listed for each type","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"example":{"post":"id"},"properties":{"post":{"description":"Comma separated field names for post","example":"id","type":"string","x-struct":null,"x-validate":null}},"type":"object","x-struct":null,"x-validate":null},"style":"deepObject"}],"requestBody":{"content":{"application/vnd.api+json":{"schema":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"content":{"anyOf":[{"type":"string","x-struct":null,"x-validate":null},{"type":"null"}]}},"type":"object","x-struct":null,"x-validate":null},"id":{"type":"string","x-struct":null,"x-validate":null},"relationships":{"additionalProperties":false,"properties":{},"type":"object","x-struct":null,"x-validate":null},"type":{"enum":["post"],"x-struct":null,"x-validate":null}},"required":["id"],"type":"object","x-struct":null,"x-validate":null}},"required":["data"],"type":"object","x-struct":null,"x-validate":null}}},"description":"Request body for the /posts/:id operation on post resource","required":false},"responses":{"200":{"content":{"application/vnd.api+json":{"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/post"},"included":{"items":{"oneOf":[],"x-struct":null,"x-validate":null},"type":"array","uniqueItems":true,"x-struct":null,"x-validate":null},"meta":{"additionalProperties":true,"type":"object","x-struct":null,"x-validate":null}},"x-struct":null,"x-validate":null}}},"description":"Success"},"default":{"$ref":"#/components/responses/errors"}},"tags":["post"]}},"/sign_in/{id}":{"post":{"callbacks":{},"deprecated":false,"description":"Attempt to sign in using a email and password.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","x-struct":null,"x-validate":null},"style":"form"},{"description":"Relationship paths to include in the response","explode":false,"in":"query","name":"include","required":false,"schema":{"pattern":"^()(,())*$","type":"string","x-struct":null,"x-validate":null},"style":"form"},{"description":"Limits the response fields to only those listed for each type","in":"query","name":"fields","required":false,"schema":{"additionalProperties":true,"example":{"user":"id,email"},"properties":{"user":{"description":"Comma separated field names for user","example":"id,email","type":"string","x-struct":null,"x-validate":null}},"type":"object","x-struct":null,"x-validate":null},"style":"deepObject"}],"requestBody":{"content":{"application/vnd.api+json":{"schema":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"attributes":{"additionalProperties":false,"properties":{"email":{"description":"The email to use for retrieving the user.","type":"string","x-struct":null,"x-validate":null},"password":{"description":"The password to check for the matching user.","type":"string","x-struct":null,"x-validate":null}},"required":["email","password"],"type":"object","x-struct":null,"x-validate":null},"relationships":{"additionalProperties":false,"properties":{},"type":"object","x-struct":null,"x-validate":null},"type":{"enum":["user"],"x-struct":null,"x-validate":null}},"type":"object","x-struct":null,"x-validate":null}},"required":["data"],"type":"object","x-struct":null,"x-validate":null}}},"description":"Request body for the /sign_in/:id operation on user resource","required":true},"responses":{"201":{"content":{"application/vnd.api+json":{"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/user"},"included":{"items":{"oneOf":[],"x-struct":null,"x-validate":null},"type":"array","uniqueItems":true,"x-struct":null,"x-validate":null},"meta":{"additionalProperties":true,"type":"object","x-struct":null,"x-validate":null}},"x-struct":null,"x-validate":null}}},"description":"Success"},"default":{"$ref":"#/components/responses/errors"}},"tags":["user"]}}},"security":[{"bearerAuth":[]}],"servers":[],"tags":[]}