Skip to content

Commit 3abc35f

Browse files
committed
Update README with new spec and instructions
update two images
1 parent 18530e0 commit 3abc35f

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

README.md

+18-8
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,35 @@
22
An OpenAPI (Swagger) specification for the Xero API
33

44
## 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.
66

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)
917

1018
## 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`
1222

13-
![SwaggerUI Example](images/swagger-ui.png)
23+
![SwaggerUI Example](images/import-api.png)
1424

1525
## 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.
1727

18-
![Swagger Editor Example](images/editor.png)
28+
![Swagger Hub Example](images/swaggerhub.png)
1929

2030
## Postman
2131
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).
2232

2333
![Postman Example](images/postman.png)
2434

2535
## 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.

images/import-api.png

62.7 KB
Loading

images/swaggerhub.png

185 KB
Loading

0 commit comments

Comments
 (0)