Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
Change version header to 1.0 (#425)
Browse files Browse the repository at this point in the history
Changes the version header of the public API to 1.0 from 0.2.

By using a 1.0 version header, we give partners the most amount of time before June 18th to migrate to the new breaking changes, and don't introduce another mandatory breaking change before open-sourcing.
  • Loading branch information
0xCLARITY authored Jun 1, 2020
1 parent 81d10ee commit 711bef9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const payIdServerVersions: readonly string[] = ['0.2']
export const payIdServerVersions: readonly string[] = ['1.0']
export const privateApiVersions: readonly string[] = ['2020-05-28']

/**
Expand Down
2 changes: 1 addition & 1 deletion test/integration/e2e/private-api/metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe('E2E - privateAPIRouter - GET /metrics', function (): void {
): Promise<request.Test> {
return request(app.publicAPIExpress)
.get(`/${account}`)
.set('PayID-Version', '0.2')
.set('PayID-Version', '1.0')
.set('Accept', accept)
.expect((res) => {
assert.strictEqual(res.status, status)
Expand Down
12 changes: 6 additions & 6 deletions test/integration/e2e/public-api/basePayId.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('E2E - publicAPIRouter - Base PayID', function (): void {
// WHEN we make a GET request to the public endpoint to retrieve payment info with an Accept header specifying xrpl-mainnet
request(app.publicAPIExpress)
.get(payId)
.set('PayID-Version', '0.2')
.set('PayID-Version', '1.0')
.set('Accept', acceptHeader)
// THEN we get back our Accept header as the Content-Type
.expect((res) => {
Expand Down Expand Up @@ -83,7 +83,7 @@ describe('E2E - publicAPIRouter - Base PayID', function (): void {
// WHEN we make a GET request to the public endpoint to retrieve payment info with an Accept header specifying xrpl-testnet
request(app.publicAPIExpress)
.get(payId)
.set('PayID-Version', '0.2')
.set('PayID-Version', '1.0')
.set('Accept', acceptHeader)
// THEN we get back our Accept header as the Content-Type
.expect((res) => {
Expand Down Expand Up @@ -114,7 +114,7 @@ describe('E2E - publicAPIRouter - Base PayID', function (): void {
// WHEN we make a GET request to the public endpoint to retrieve payment info with an Accept header specifying btc-testnet
request(app.publicAPIExpress)
.get(payId)
.set('PayID-Version', '0.2')
.set('PayID-Version', '1.0')
.set('Accept', acceptHeader)
// THEN we get back our Accept header as the Content-Type
.expect((res) => {
Expand Down Expand Up @@ -145,7 +145,7 @@ describe('E2E - publicAPIRouter - Base PayID', function (): void {
// WHEN we make a GET request to the public endpoint to retrieve payment info with an Accept header specifying ACH
request(app.publicAPIExpress)
.get(payId)
.set('PayID-Version', '0.2')
.set('PayID-Version', '1.0')
.set('Accept', acceptHeader)
// THEN we get back our Accept header as the Content-Type
.expect((res) => {
Expand All @@ -169,7 +169,7 @@ describe('E2E - publicAPIRouter - Base PayID', function (): void {
// WHEN we make a GET request to the public endpoint to retrieve payment info with an Accept header specifying xrpl-testnet
request(app.publicAPIExpress)
.get(payId)
.set('PayID-Version', '0.2')
.set('PayID-Version', '1.0')
.set('Accept', acceptHeader)
.expect('Content-Type', /application\/json/u)
// THEN we get back a 404 with the expected error response.
Expand All @@ -190,7 +190,7 @@ describe('E2E - publicAPIRouter - Base PayID', function (): void {
// WHEN we make a GET request to the public endpoint to retrieve payment info with an Accept header specifying xrpl-devnet
request(app.publicAPIExpress)
.get(payId)
.set('PayID-Version', '0.2')
.set('PayID-Version', '1.0')
.set('Accept', acceptHeader)
.expect('Content-Type', /application\/json/u)
// THEN we get back a 404 with the expected error response.
Expand Down
8 changes: 4 additions & 4 deletions test/integration/e2e/public-api/contentNegotiation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('E2E - publicAPIRouter - Content Negotiation', function (): void {
// both testnet and mainnet, with no q for either
request(app.publicAPIExpress)
.get(payId)
.set('PayID-Version', '0.2')
.set('PayID-Version', '1.0')
.set('Accept', acceptHeader)
// THEN we get back an xrpl testnet header as our Content-Type
.expect((res) => {
Expand Down Expand Up @@ -75,7 +75,7 @@ describe('E2E - publicAPIRouter - Content Negotiation', function (): void {
// and mainnet, with testnet having a higher q-value
request(app.publicAPIExpress)
.get(payId)
.set('PayID-Version', '0.2')
.set('PayID-Version', '1.0')
.set('Accept', acceptHeader)
// THEN we get back an xrpl testnet header as the Content-Type
.expect((res) => {
Expand Down Expand Up @@ -110,7 +110,7 @@ describe('E2E - publicAPIRouter - Content Negotiation', function (): void {
// xrpl-testnet and xrpl-mainnet, with a higher q for xrpl-mainnet
request(app.publicAPIExpress)
.get(payId)
.set('PayID-Version', '0.2')
.set('PayID-Version', '1.0')
.set('Accept', acceptHeader)
// THEN we get back a xrpl-mainnet accept header as the Content-Type
.expect((res) => {
Expand Down Expand Up @@ -146,7 +146,7 @@ describe('E2E - publicAPIRouter - Content Negotiation', function (): void {
// a non-existent network+environment most preferred, followed by xrpl-mainnet and xrpl-testnet
request(app.publicAPIExpress)
.get(payId)
.set('PayID-Version', '0.2')
.set('PayID-Version', '1.0')
.set('Accept', acceptHeader)
// THEN we get back a xrpl-mainnet accept header as the Content-Type
.expect((res) => {
Expand Down
4 changes: 2 additions & 2 deletions test/integration/e2e/public-api/travelRule.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('E2E - publicAPIRouter - Travel Rule', function (): void {
// WHEN we make a GET request to the public endpoint to retrieve the PaymentSetupDetails
request(app.publicAPIExpress)
.get(`${payId}/payment-setup-details`)
.set('PayID-Version', '0.2')
.set('PayID-Version', '1.0')
.set('Accept', acceptHeader)
// THEN we get back a 200 - OK with the PaymentSetupDetails
.expect(isExpectedPaymentSetupDetails(expectedResponse))
Expand All @@ -83,7 +83,7 @@ describe('E2E - publicAPIRouter - Travel Rule', function (): void {
// WHEN we make a GET request to the public endpoint to retrieve the PaymentSetupDetails
request(app.publicAPIExpress)
.post(`${payId}/payment-setup-details`)
.set('PayID-Version', '0.2')
.set('PayID-Version', '1.0')
.send(wrapMessage(mockComplianceData, MessageType.Compliance))
.expect('Content-Type', /json/u)
// THEN we get back the PaymentSetupDetails
Expand Down

0 comments on commit 711bef9

Please sign in to comment.