You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-31Lines changed: 24 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
An OpenAPI (Swagger) specification for the Xero API with OAuth 2.0 security schema.
3
3
4
4
## Description
5
-
This repository holds the official Xero [OpenAPI](https://www.openapis.org/) descriptions.
5
+
This repository holds the official Xero [OpenAPI](https://www.openapis.org/) descriptions.
6
6
7
7
OpenAPI spec 3.0
8
8
In Release (used for one or more SDKs)
@@ -19,43 +19,33 @@ In Release (used for one or more SDKs)
19
19
20
20
## Contribution guide
21
21
22
-
[Conventional commit](https://www.conventionalcommits.org/en/v1.0.0/#summary)format should be used when contributing to this repo.
22
+
Use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary)for all commits.
23
23
24
-
**Context:**
24
+
Why this matters:
25
25
26
-
Release notes are generated using [semantic-release](https://github.com/semantic-release/semantic-release). In brief this package analyses all the commits in the repo to determine the next version number, generate the release notes and publish the package, hence the commit message is important for the release to happen successfully. Please read more on the conventional commit [documentation](https://www.conventionalcommits.org/en/v1.0.0/#summary) before landing your commits, each commit message will determine the release notes.
26
+
- We use [semantic-release](https://github.com/semantic-release/semantic-release) to calculate versions automatically.
If your commit message is - ``feat: added a new parameter in the get_account method`` - It will do a **minor version update**.
31
+
-`feat:` -> minor version bump
32
+
-`fix:` -> patch version bump
33
+
-`!` in the header or `BREAKING CHANGE:` footer -> major version bump
31
34
32
-
Following release notes will be generated -
35
+
Examples:
33
36
37
+
```text
38
+
feat(accounting): add includeArchived query parameter to GET /Accounts
34
39
```
35
-
Release notes
36
40
37
-
Feature -
38
-
- added a new parameter in the get_account method
41
+
```text
42
+
fix(files): correct nullable schema for File.ContentLength
39
43
```
40
44
41
-
If your commit message is - ``fix: fixed the null issue with get_invoice method`` - It will do a **patch version update**.
42
-
43
-
Following release notes will be generated -
44
-
45
-
```
46
-
Release notes
47
-
48
-
Fix -
49
-
- fixed the null issue with get_invoice method
50
-
```
51
-
52
-
53
-
if your commit message is as below it will do a **major version update** (Breaking change)
45
+
```text
46
+
feat(payroll-nz)!: remove deprecated EarningsRateID field from Payslip response
54
47
55
-
```
56
-
chore!: drop support for Node 6
57
-
58
-
BREAKING CHANGE: use JavaScript features not available in Node 6
48
+
BREAKING CHANGE: clients must use EarningsRateIdentifier instead of EarningsRateID.
59
49
```
60
50
61
51
@@ -64,7 +54,7 @@ We are using [OpenAPI generator](https://github.com/OpenAPITools/openapi-generat
64
54
65
55
## Preview
66
56
### Online
67
-
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).
57
+
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).
68
58
69
59
Once you sign up or login, you can create a new API under your account and import a Xero API spec.
70
60
@@ -99,10 +89,13 @@ This repository includes automated API diff checking using [oasdiff](https://git
Branches containing `breaking` anywhere in the name will allow breaking changes without failing the build. All other branches will fail if breaking changes are detected.
92
+
### Breaking Change Enforcement
93
+
By default, API diff checks fail when breaking changes are detected.
94
+
95
+
Breaking changes are allowed only when commit messages include a Conventional Commits breaking marker:
-`!` in the commit header, for example `feat!: remove deprecated endpoint`
98
+
-`BREAKING CHANGE:` in the commit body/footer
106
99
107
100
### Full Documentation
108
101
For detailed usage, configuration options, environment variables, and integration details, see [scripts/api-diff/README.md](scripts/api-diff/README.md).
0 commit comments