|
2 | 2 | An OpenAPI (Swagger) specification for the Xero API
|
3 | 3 |
|
4 | 4 | ## Description
|
5 |
| -This repository holds the official Xero [OpenAPI](https://www.openapis.org/) descriptions. We've started with the Accounting API but we'll work on adding more if they prove useful to the community. |
| 5 | +This repository holds the official Xero [OpenAPI](https://www.openapis.org/) descriptions. |
6 | 6 |
|
7 |
| -* [Accounting API - OpenAPI 2.0 - yaml](https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/master/spec/accounting2.yaml) |
8 |
| -* [Accounting API - OpenAPI 2.0 - json](https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/master/spec/accounting2.json) |
| 7 | +OpenAPI spec 3.0 |
| 8 | +* [Accounting API - yaml](https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/oas3/spec/v3/Xero_accounting_2.0.0_swagger.yaml) |
| 9 | +* [Accounting API - json](https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/oas3/spec/v3/Xero_accounting_2.0.0_swagger.json) |
| 10 | +* [Fixed Assets API - yaml](https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/oas3/spec/v3/Xero_assets_1.0.0_swagger.yaml) |
| 11 | +* [Fixed Assets API - json](https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/oas3/spec/v3/Xero_assets_1.0.0_swagger.json) |
| 12 | + |
| 13 | + |
| 14 | +OpenAPI spec 2.0 (Swagger) |
| 15 | +* [Accounting API - yaml](https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/oas3/spec/v2/accounting2.yaml) |
| 16 | +* [Accounting API - json](https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/oas3/spec/v2/accounting2.json) |
9 | 17 |
|
10 | 18 | ## Preview
|
11 |
| -There are lots of tools available for viewing OpenAPI descriptions in a nicely formatted way. A popular tool is Swagger UI - a version of which is [hosted here](http://petstore.swagger.io/). In the URL field just enter the 'raw' URL of the spec file e.g.: `https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/master/spec/accounting2.yaml` |
| 19 | +There are lots of tools available for viewing and editing OpenAPI descriptions in a nicely formatted way. A popular tool is SwaggerHub - a version of which is [hosted here](https://app.swaggerhub.com/home). |
| 20 | + |
| 21 | +Once you sign up or login, you can create a new API under your account and import a Xero API spec using the 'raw' URL of the spec file e.g.: `https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/oas3/spec/v3/Xero_accounting_2.0.0_swagger.yaml` |
12 | 22 |
|
13 |
| - |
| 23 | + |
14 | 24 |
|
15 | 25 | ## Updates
|
16 |
| -If you find something missing or incorrect then please [open an issue](https://github.com/XeroAPI/Xero-OpenAPI/issues/new) or send us a pull request. There are lots of tools for editing OpenAPI definitions including the Swagger Editor. Just copy the existing definition into the left-hand window and preview the changes on the right. |
| 26 | +If you find something missing or incorrect then please [open an issue](https://github.com/XeroAPI/Xero-OpenAPI/issues/new) or send us a pull request. There are lots of tools for editing OpenAPI definitions including the SwaggerHub. Just use the import instructions above. |
17 | 27 |
|
18 |
| - |
| 28 | + |
19 | 29 |
|
20 | 30 | ## Postman
|
21 | 31 | Postman will automatically import OpenAPI definitions but the OpenAPI spec doesn't support OAuth1.0a. To use our OpenAPI definitions to make requests in Postman you will need to also import the Xero OAuth1a Postman collection from our [Xero-Postman repo](https://github.com/XeroAPI/Xero-Postman).
|
22 | 32 |
|
23 | 33 | 
|
24 | 34 |
|
25 | 35 | ## Thanks
|
26 |
| -Thanks very much to @calcinai for contributing the [xero-schemas](https://github.com/calcinai/xero-schemas) from his [xero-php](https://github.com/calcinai/xero-php) project. It was super useful when creating the official definition. Also check out his definitions for [AU Payroll](https://github.com/calcinai/xero-schemas/blob/master/schemas/payroll_au.json), [US Payroll](https://github.com/calcinai/xero-schemas/blob/master/schemas/payroll_us.json), [Assets](https://github.com/calcinai/xero-schemas/blob/master/schemas/assets.json) and [Files](https://github.com/calcinai/xero-schemas/blob/master/schemas/files.json). |
| 36 | +Thanks very much to @calcinai for contributing the original swagger 2.0 version of [xero-schemas](https://github.com/calcinai/xero-schemas) from his [xero-php](https://github.com/calcinai/xero-php) project. It was super useful when creating the official definition. |
0 commit comments