UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 7.96 kB
{"openapi":"3.0.0","info":{"title":"Reimbursements API","version":"1.0","x-apisguru-categories":["financial"],"x-logo":{"url":"https://linuxfoundation.org/wp-content/uploads/lf_yoast.jpg"},"x-origin":[{"format":"swagger","url":"https://api-gw.dev.platform.linuxfoundation.org/reimbursement-service/swagger.json","version":"2.0"}],"x-providerName":"linuxfoundation.org","x-serviceName":"reimbursement"},"security":[{"ApiKeyAuth":[]}],"tags":[{"name":"reimbursement"}],"paths":{"/api-docs":{"get":{"operationId":"getDoc","responses":{"200":{"$ref":"#/components/responses/ok"}},"security":[],"summary":"Get swagger documentation","tags":["docs"]}},"/expense/{action}/{reportId}":{"post":{"description":"approves or rejects expense report","operationId":"expenseAction","parameters":[{"in":"path","name":"action","required":true,"schema":{"type":"string"}},{"in":"path","name":"reportId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/ok"},"400":{"$ref":"#/components/responses/invalid-request"},"401":{"$ref":"#/components/responses/unauthorized"},"500":{"$ref":"#/components/responses/error"}},"summary":"Expense Action"}},"/health":{"get":{"operationId":"healthCheck","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/health"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/health"}}}}},"security":[],"summary":"Get API Health Status"}},"/reimbursement/{projectId}":{"parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}}],"patch":{"description":"Update an existing Reimbursement policy","operationId":"updateReimbursement","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/policy-update-input"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/ok"},"400":{"$ref":"#/components/responses/invalid-request"},"401":{"$ref":"#/components/responses/unauthorized"},"404":{"$ref":"#/components/responses/not-found"},"500":{"$ref":"#/components/responses/error"}},"summary":"Update Reimbursement","tags":["reimbursement"]},"post":{"description":"Create a new Reimbursement policy","operationId":"createReimbursement","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/policy-create-input"},{"$ref":"#/components/schemas/policy-update-input"}]}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/ok"},"400":{"$ref":"#/components/responses/invalid-request"},"401":{"$ref":"#/components/responses/unauthorized"},"500":{"$ref":"#/components/responses/error"}},"summary":"Create Reimbursement","tags":["reimbursement"]}},"/reset":{"post":{"description":"Reset an existing policy to match with templatePolicy","operationId":"resetPolicy","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/policy-reset-input"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/ok"},"400":{"$ref":"#/components/responses/invalid-request"},"401":{"$ref":"#/components/responses/unauthorized"},"500":{"$ref":"#/components/responses/error"}},"summary":"Reset Policy"}},"/tag":{"post":{"description":"Tag adds a tag to the policy","operationId":"tagPolicy","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/policy-tag-input"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/ok"},"400":{"$ref":"#/components/responses/invalid-request"},"401":{"$ref":"#/components/responses/unauthorized"},"500":{"$ref":"#/components/responses/error"}},"summary":"Tag Policy"}}},"servers":[{"url":"/v1"}],"components":{"responses":{"error":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error-response"}}}},"invalid-request":{"description":"Invalid Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error-response"}}}},"not-found":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error-response"}}}},"ok":{"description":"OK"},"unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error-response"}}}}},"securitySchemes":{"ApiKeyAuth":{"description":"For accessing the API a valid API Key must be passed in all the queries in the 'X-API-KEY' header.\n","in":"header","name":"X-API-Key","type":"apiKey"}},"schemas":{"contact":{"description":"Contact information","properties":{"EmailAddress":{"example":"BugsBunny@example.org","type":"string"},"Name":{"example":"Bugs Bunny","type":"string"}},"title":"Contact","type":"object"},"error-response":{"description":"Standard error format","properties":{"Code":{"description":"Error Code","example":401,"format":"int64","type":"number"},"Message":{"description":"Error Message","example":"Unauthorized","type":"string"}},"title":"Error Response","type":"object"},"health":{"properties":{"BuildTimeStamp":{"description":"Time the service was built and deployed","example":"2019-06-06_02:59:49PM","type":"string"},"Githash":{"description":"hash of the latest Git commit of the service at time of building","example":"62009963c9e1cedaf7a24649208983163f8c439e","type":"string"},"Healths":{"items":{"$ref":"#/components/schemas/health-status"},"type":"array"},"Status":{"description":"Confirmation that the service is doing well","example":"healthy","type":"string"},"TimeStamp":{"description":"Current server time","example":"2019-06-07 15:37:43.131125775 +0000 UTC m=+0.257970409","type":"string"}},"title":"Health","type":"object"},"health-status":{"properties":{"Duration":{"description":"Service response time","type":"string"},"Error":{"description":"Service Name","type":"string"},"Healthy":{"description":"Service is healthy?","type":"boolean"},"Name":{"description":"Service Name","type":"string"},"TimeStamp":{"description":"Service's server time","example":"2019-06-07 15:37:43.131120884 +0000 UTC m=+0.257965506","type":"string"}},"title":"Health Status","type":"object"},"policy-create-input":{"description":"Reimbursement creation information","properties":{"ProjectName":{"example":"The Looney Tunes Show","type":"string"}},"required":["ProjectName"],"title":"Policy Create","type":"object"},"policy-reset-input":{"description":"Expensify policy reset information","properties":{"PolicyID":{"description":"Unique ID of the policy to reset","example":"F11B6C1D67DC6A3D","type":"string"},"TemplatePolicyID":{"description":"Unique ID of the template policy to copy from","example":"F11B6C1D67DC6A3D","type":"string"}},"required":["PolicyID"],"title":"Policy Reset","type":"object"},"policy-tag-input":{"description":"Expensify policy tag information","properties":{"Email":{"description":"email of the individual or beneficiary","example":"john-doe@email.com","type":"string"},"TicketID":{"description":"Unique ID of the ticket - required for travel funds","example":"F11B6C1D67DC6A3D","type":"string"},"TxnType":{"description":"Type of transaction","example":"Travel Fund","type":"string"},"Username":{"description":"Unique username or lfId of the individual","example":"john_doe","type":"string"}},"title":"Policy Tag","type":"object"},"policy-update-input":{"description":"Reimbursement update information","properties":{"Beneficiaries":{"example":[{"EmailAddress":"DaffyDuck@example.org","Name":"Daffy Duck"},{"EmailAddress":"PorkyPig@example.org","Name":"Porky Pik"}],"items":{"$ref":"#/components/schemas/contact"},"type":"array"},"Categories":{"example":["Anvils","Carrots","Travel"],"items":{"type":"string"},"type":"array"},"EntityType":{"example":"other","type":"string"},"Owner":{"$ref":"#/components/schemas/contact"},"ProjectURL":{"example":"https://funding.dev.platform.linuxfoundation.org/projects/asp-net","type":"string"}},"required":["Categories","Owner","ProjectURL"],"title":"Policy Update","type":"object"}}}}