From 9f3498c2132085ff705fe89343ba924590cf3f23 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Tue, 26 Mar 2024 21:59:53 -0400 Subject: [PATCH 01/23] Fixed country_code, site_id and mailer_id to be common type, so it works with C# client generation --- openapi.yaml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 41bbad1..77ed247 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -6414,8 +6414,8 @@ components: minLength: 1 description: Account number site_id: - allOf: - - $ref: '#/components/schemas/se_id' + type: string + minLength: 1 description: A string that uniquely identifies the site password: type: string @@ -6509,8 +6509,8 @@ components: minLength: 1 description: The company country_code: - type: string - minLength: 1 + allOf: + - $ref: '#/components/schemas/country_code' description: Country code email: allOf: @@ -6587,8 +6587,8 @@ components: minLength: 1 description: The company country_code: - type: string - minLength: 1 + allOf: + - $ref: '#/components/schemas/country_code' description: Country code email: allOf: @@ -6640,8 +6640,8 @@ components: minLength: 1 description: Nickname mailer_id: - allOf: - - $ref: '#/components/schemas/se_id' + type: string + minLength: 1 description: A string that uniquely identifies the mailer profile_name: type: string @@ -6688,9 +6688,8 @@ components: minimum: 0 description: Merchant id mailer_id: - type: integer - format: int32 - minimum: 0 + type: string + minLength: 1 description: Mailer id induction_site: type: string @@ -6962,8 +6961,8 @@ components: minLength: 1 description: Postal code country_code: - type: string - minLength: 1 + allOf: + - $ref: '#/components/schemas/country_code' description: Country code email: allOf: @@ -11452,7 +11451,6 @@ components: allOf: - $ref: '#/components/schemas/postal_code' country_code: - type: string allOf: - $ref: '#/components/schemas/country_code' providers: From ba0fc45fdf981a95e65d27f3f475b8b8431cc49b Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Tue, 11 Aug 2020 17:01:39 -0700 Subject: [PATCH 02/23] This item is nullable as the actual code can return null here (included in JSON, but null). So either we need to mark it as nullable here or the service should not be including the value. (cherry picked from commit aabd5e7910b1cfa632cf3bd9ad0788e730a8b343) --- openapi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/openapi.yaml b/openapi.yaml index 77ed247..4f908e6 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5780,6 +5780,7 @@ components: additionalProperties: false properties: package_id: + nullable: true allOf: - $ref: '#/components/schemas/se_id' description: A string that uniquely identifies the package. From c867514e7d164307487e7d9637ffd7f8558be051 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Wed, 12 Aug 2020 17:02:31 -0700 Subject: [PATCH 03/23] These all need to be nullable also as the service responses actually have nulls in them (cherry picked from commit 0f7b9bbae1608ab42d75a1dd6549f5d6418151b3) --- openapi.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 4f908e6..2289b44 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -8159,10 +8159,12 @@ components: - $ref: '#/components/schemas/se_id' description: A string that uniquely identifies the shipment carrier_id: + nullable: true allOf: - $ref: '#/components/schemas/se_id' description: The carrier account that is billed for the shipping charges service_code: + nullable: true allOf: - $ref: '#/components/schemas/service_code' description: > @@ -8223,11 +8225,13 @@ components: shipped on Sunday will ship on Monday instead. created_at: readOnly: true + nullable: true allOf: - $ref: '#/components/schemas/date_time' description: The date and time that the shipment was created in ShipEngine. modified_at: readOnly: true + nullable: true allOf: - $ref: '#/components/schemas/date_time' description: The date and time that the shipment was created or last modified. @@ -8311,6 +8315,7 @@ components: Arbitrary tags associated with this shipment. Tags can be used to categorize shipments, and shipments can be queried by their tags. order_source_code: + nullable: true allOf: - $ref: '#/components/schemas/order_source_name' packages: @@ -9031,6 +9036,7 @@ components: nullable: true default: null collect_on_delivery: + nullable: true $ref: '#/components/schemas/collect_on_delivery' third_party_consignee: type: boolean @@ -9186,6 +9192,7 @@ components: - $ref: '#/components/schemas/label_messages' external_package_id: type: string + nullable: true minLength: 1 description: An external package id. label_download: From 1bd40d726c1ac363e6e9c50e5df0e46b4582e272 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Thu, 13 Aug 2020 20:22:36 -0700 Subject: [PATCH 04/23] These can be null for UPS SurePost, so the spec needs to handle that (cherry picked from commit 9ca0d97a1c8d88471a1b2f9d263424d8705915b9) --- openapi.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 2289b44..f9bd3f4 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -10918,6 +10918,7 @@ components: type: integer format: int32 readOnly: true + nullable: true minimum: 1 example: 5 description: > @@ -10931,11 +10932,13 @@ components: description: Indicates if the rate is guaranteed. estimated_delivery_date: readOnly: true + nullable: true allOf: - $ref: '#/components/schemas/date' carrier_delivery_days: type: string readOnly: true + nullable: true minLength: 1 description: The carrier delivery days ship_date: From 841579d5dc91c965c23bba9b5b2b74acd5bed624 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Tue, 26 Mar 2024 22:04:48 -0400 Subject: [PATCH 05/23] The customs_item_id is marked as required and not-nullable, but it really should be nullable so it can be left out of the request. --- openapi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/openapi.yaml b/openapi.yaml index f9bd3f4..086bcba 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -8810,6 +8810,7 @@ components: properties: customs_item_id: readOnly: true + nullable: true allOf: - $ref: '#/components/schemas/se_id' description: A string that uniquely identifies the customs item From 04ebd2a5e5c85cfc4c17e79dc0083165a2959d4a Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Tue, 26 Mar 2024 21:33:36 -0400 Subject: [PATCH 06/23] There is already a type for carrier code so it should be used and NOT a string! (cherry picked from commit 8ea157a82fc99c8a63f8a2915d36584b2bc084a3) (cherry picked from commit c7af338a849915578c03d02065a2a0dd397193e0) --- openapi.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 086bcba..aba9266 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5744,8 +5744,13 @@ components: - $ref: '#/components/schemas/se_id' description: A string that uniquely identifies the carrier carrier_code: + readOnly: true allOf: - - $ref: '#/components/schemas/se_id' + - $ref: '#/components/schemas/carrier_code' + description: > + The [shipping + carrier](https://www.shipengine.com/docs/carriers/setup/) who will + ship the package, such as `fedex`, `dhl_express`, `stamps_com`, etc. service_code: type: string minLength: 1 @@ -10967,10 +10972,14 @@ components: readOnly: true description: Indicates if rate is trackable carrier_code: - type: string readOnly: true - minLength: 1 - description: carrier code + allOf: + - $ref: '#/components/schemas/carrier_code' + description: > + The [shipping + carrier](https://www.shipengine.com/docs/carriers/setup/) who + will ship the package, such as `fedex`, `dhl_express`, + `stamps_com`, etc. carrier_nickname: type: string readOnly: true From 1e5d0d7024408cc92d6ee901219ed1b198b35a4e Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Fri, 11 Sep 2020 10:52:04 -0700 Subject: [PATCH 07/23] Add support for undocumented test_labels parameters (cherry picked from commit 6297be8ce5be8e48cfdcb2b82b5d98e4fbaec894) (cherry picked from commit f85ed1a46864ddce0bc6ce8c445571032714fad8) (cherry picked from commit 603d5ff43fe61bae5b8e5ed3c64038b5bc9b5d3f) --- openapi.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index aba9266..6b2e838 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -9663,6 +9663,12 @@ components: allOf: - $ref: '#/components/schemas/display_scheme' description: The display format that the label should be shown in. + test_label: + type: boolean + default: false + description: >- + Indicate if this label is being used only for testing purposes. If + true, then no charge will be added to your account. This only works with Stamps.com and Endicia for USPS create_label_from_rate_response_body: title: create_label_from_rate_response_body type: object @@ -9695,6 +9701,12 @@ components: allOf: - $ref: '#/components/schemas/display_scheme' description: The display format that the label should be shown in. + test_label: + type: boolean + default: false + description: >- + Indicate if this label is being used only for testing purposes. If + true, then no charge will be added to your account. This only works with Stamps.com and Endicia for USPS create_label_from_shipment_response_body: title: create_label_from_shipment_response_body type: object From 3d7668f401e01aaeff8a0e01e72af78e1388e92d Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Fri, 11 Sep 2020 12:44:44 -0700 Subject: [PATCH 08/23] Warehouse ID is *not* required for manifesting, and this will fail to parse the responses sent back if you manifest for specific labels. (cherry picked from commit 20dcf314c386e1e3d0e69eca2aee6bcf8b2104a8) (cherry picked from commit 26b6dabc753465f4fddd0909a882659707e53b60) (cherry picked from commit 85576dc98979e6f46a4caa35833786e5e12fce94) --- openapi.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 6b2e838..c4e684b 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -10128,6 +10128,7 @@ components: - $ref: '#/components/schemas/se_id' description: An array of the label ids used in this manifest. warehouse_id: + nullable: true readOnly: true allOf: - $ref: '#/components/schemas/se_id' @@ -10166,10 +10167,6 @@ components: title: create_manifest_by_object_request_body type: object description: A create manifest request body - required: - - carrier_id - - warehouse_id - - ship_date additionalProperties: false properties: carrier_id: @@ -10317,6 +10314,7 @@ components: example: 100 description: The number of shipments that are included in this manifest warehouse_id: + nullable: true deprecated: true allOf: - $ref: '#/components/schemas/se_id' From bb9f92f3e5437c3a2601b031fb9de50f10f29ab8 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Fri, 11 Sep 2020 13:24:07 -0700 Subject: [PATCH 09/23] Tracking numbers need to be optional to correctly parse the response when a label is a test label with USPS. (cherry picked from commit 444f133e2ccd26e25f9715ec237637483efa16d6) (cherry picked from commit 64a27073a3574aa48f42b8d827ced5c5a1e7c87c) (cherry picked from commit 3e60dbb5cfbe9cb71d25ad2d3a2ea70153bf7e41) --- openapi.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index c4e684b..59ac82d 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -7608,10 +7608,10 @@ components: The total shipping cost for the specified comparison_rate_type. tracking_number: - type: string - minLength: 1 readOnly: true - example: '782758401696' + nullable: true + allOf: + - $ref: '#/components/schemas/tracking_number' description: >- The tracking number for the package. Tracking number formats vary across carriers. @@ -7917,10 +7917,10 @@ components: description: | The total shipping cost for the specified comparison_rate_type. tracking_number: - type: string - minLength: 1 readOnly: true - example: '782758401696' + nullable: true + allOf: + - $ref: '#/components/schemas/tracking_number' description: >- The tracking number for the package. Tracking number formats vary across carriers. @@ -9188,6 +9188,7 @@ components: field of the shipment to be set. tracking_number: readOnly: true + nullable: true allOf: - $ref: '#/components/schemas/tracking_number' description: > @@ -9793,6 +9794,7 @@ components: additionalProperties: false properties: tracking_number: + nullable: true allOf: - $ref: '#/components/schemas/tracking_number' tracking_url: From 0fce42c7991ad815c55c37a4dd2e0f487a7bc5d5 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Fri, 11 Sep 2020 16:19:45 -0700 Subject: [PATCH 10/23] These should not be marked as obsolete as it will cause the compiler to throw and error if you use it. And it still does work. (cherry picked from commit 433dc5ee5dbb8da03253f8f80528fe89e80a05b2) (cherry picked from commit a5405f10b3e91ba6f1b1a06a8c4fb77db8170214) (cherry picked from commit c66e6b694e7d5f97fd29cfe518cfd646374cd658) --- openapi.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 59ac82d..d959304 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -7677,7 +7677,6 @@ components: writeOnly: true type: boolean default: false - deprecated: true description: >- Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your @@ -7984,7 +7983,6 @@ components: writeOnly: true type: boolean default: false - deprecated: true description: >- Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account. From ea928b74cabf2d0eb87d395d95cdc327bffdc36d Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Wed, 23 Sep 2020 15:34:54 -0700 Subject: [PATCH 11/23] Fixed incorrectly specified 204 responses as they are actually empty and there is no response content to parse (cherry picked from commit 2147f27c6f328a65d186bfc77e5f3d294e05a740) (cherry picked from commit 47f4a77b67fbbd56248051d54e3996edda7aa401) (cherry picked from commit 3c59f106f33a4b2e086c6d0f1f45bfbce1242763) --- openapi.yaml | 135 +-------------------------------------------------- 1 file changed, 1 insertion(+), 134 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index d959304..2064b8e 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -751,13 +751,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -792,13 +785,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -836,13 +822,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -938,13 +917,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -976,13 +948,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -1283,13 +1248,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '404': $ref: '#/components/responses/404_error_response' '500': @@ -1344,13 +1302,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '404': $ref: '#/components/responses/404_error_response' '500': @@ -1552,13 +1503,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -1574,13 +1518,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -2404,13 +2341,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -2426,13 +2356,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -3540,13 +3463,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -3700,13 +3616,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -3778,13 +3687,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -3816,13 +3718,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -3941,13 +3836,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -3986,13 +3874,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -4109,13 +3990,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -4131,13 +4005,6 @@ paths: responses: '204': description: The request was successful. - content: - text/plain: - schema: - $ref: '#/components/schemas/empty_response_body' - application/json: - schema: - $ref: '#/components/schemas/empty_response_body' '400': $ref: '#/components/responses/400_error_response' '404': @@ -4915,7 +4782,6 @@ components: required: - status - original_address - - matched_address - messages additionalProperties: false properties: @@ -4929,6 +4795,7 @@ components: matched_address: nullable: true readOnly: true + nullable: true allOf: - $ref: '#/components/schemas/address' description: The matched address found by the Shipengine API From a84e0fd844cc8bc0c48b3398ae578609ea387e6b Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Mon, 28 Sep 2020 16:13:44 -0700 Subject: [PATCH 12/23] This must be nullable, as it comes back null for USPS manifest documents from Endicia. (cherry picked from commit aad88e305e79d41c7fc89128a1a25351a20aa7d5) (cherry picked from commit 3a8eefa19c90325dba335deda0a48d0d4ef79b29) (cherry picked from commit 4fbc87167644c4dab37c77c52d910a4013dbc0bd) --- openapi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/openapi.yaml b/openapi.yaml index 2064b8e..70050ae 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -10001,6 +10001,7 @@ components: - $ref: '#/components/schemas/se_id' description: A string that uniquely identifies the warehouse submission_id: + nullable: true readOnly: true type: string minLength: 1 From a72118d54e2a9a571eed65583a41a19f6edf1925 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Mon, 28 Sep 2020 19:07:44 -0700 Subject: [PATCH 13/23] Gah, this *also* needs to be nullable (cherry picked from commit ac295be2fb2932bb325c007f965e238f41369b33) (cherry picked from commit fb28b957b96a8056529049f5165aa079598e1edf) (cherry picked from commit 83d983158657b521431a6aeacaea7cd74cb59949) --- openapi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/openapi.yaml b/openapi.yaml index 70050ae..06a0e38 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -10189,6 +10189,7 @@ components: description: A string that uniquely identifies the warehouse submission_id: deprecated: true + nullable: true type: string minLength: 1 example: '9475711899564878915476' From 22509346105458cf5e578348ed444952189b8d1c Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Wed, 30 Sep 2020 15:50:31 -0700 Subject: [PATCH 14/23] Some countries do not have states, so this can fail if null is passed for an empty country (cherry picked from commit a4a1e51a59bf418d1bf794f65e5f3694851652b0) (cherry picked from commit bf993ba78e3d5eeeecc47e2338fab0fb8b377a89) (cherry picked from commit 5ff9e5869d4b7aae6fb375f78d198e7cb006714d) --- openapi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/openapi.yaml b/openapi.yaml index 06a0e38..03cc98d 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4591,6 +4591,7 @@ components: state_province: type: string minLength: 1 + nullable: true example: Manitoba description: > The state or province. For some countries (including the U.S.) only From fd15e9254f64474d6fa70714bfeb6a634f9f02c2 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Fri, 2 Oct 2020 13:09:29 -0700 Subject: [PATCH 15/23] Added in the missing carrier information to the error responses (cherry picked from commit c2628b18a255a2690808b8f3419cb08600bd9167) (cherry picked from commit b9f6822ce747bfd5a2c823ad4217f1f6eea240fd) (cherry picked from commit 126abfe09b2dd2daf1548610ffa6a870c49ad26c) --- openapi.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 03cc98d..f6bf1b4 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4141,6 +4141,22 @@ components: example: Body of request cannot be null. minLength: 1 description: An error message associated with the failed API call + carrier_id: + readOnly: true + nullable: true + allOf: + - $ref: '#/components/schemas/se_id' + description: A string that uniquely identifies the carrier. + carrier_code: + type: string + readOnly: true + nullable: true + description: A string that uniquely identifies the carrier by code. + carrier_name: + type: string + readOnly: true + nullable: true + description: A string that uniquely identifies the carrier by name. error_source: title: error_source type: string From 3ea520e6562372363a5780775213f74e22fd6e45 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Wed, 11 Nov 2020 13:46:39 -0800 Subject: [PATCH 16/23] Add support for missing label_image_id which is not documented on the web site. (cherry picked from commit 83d528a9eaa17f42ada5866bcd12b14c42520e7f) (cherry picked from commit fbfc6b971e61124204c415d212f55189832e10cb) (cherry picked from commit 244c52cf4e4883fe2e34208271745cc696d94623) --- openapi.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index f6bf1b4..63d8aa2 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -9546,6 +9546,13 @@ components: allOf: - $ref: '#/components/schemas/display_scheme' description: The display format that the label should be shown in. + label_image_id: + nullable: true + allOf: + - $ref: '#/components/schemas/image_id' + description: >- + The label image resource that was used to create a custom label + image. test_label: type: boolean default: false From fd2d4afdffd11bee8f80e6796a1f26dffbe19037 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Wed, 7 Jul 2021 18:14:09 -0700 Subject: [PATCH 17/23] These are NULLABLE, as they can come back as NULL from the addressd validation service. I am not sure why you guys changed then to not allow null??? (cherry picked from commit 300055bd600a24a10e516ef906e4baa7286414c7) (cherry picked from commit ecb75a1de3073a938c220b003484831b23c6a25c) (cherry picked from commit a44db2b31325b3a588429df96ceacbcc3ed30fd4) --- openapi.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 63d8aa2..19f82e0 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4551,6 +4551,7 @@ components: name: type: string minLength: 1 + nullable: true example: John Doe description: > The name of a contact person at this address. This field may be set @@ -4558,6 +4559,7 @@ components: phone: type: string minLength: 1 + nullable: true example: +1 204-253-9411 ext. 123 description: > The phone number of a contact person at this address. The format of From ac4c79ea60eb7ccaff2dc92b6cb9a997ded92105 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Wed, 7 Jul 2021 18:36:16 -0700 Subject: [PATCH 18/23] This must also be nullable (cherry picked from commit ebc95faa8cc0056811a07cd5865bee106ea4cd32) (cherry picked from commit 8e68602e71080e12907d664842abea72fd1683b8) (cherry picked from commit 8ddb356f53634406d1a951396b0121abdb3c2cdc) --- openapi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/openapi.yaml b/openapi.yaml index 19f82e0..ae17403 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5759,6 +5759,7 @@ components: description: Name of advanced option default_value: type: string + nullable: true minLength: 1 readOnly: true example: false From 5a55b408dc1e0a9f4220f1ff205ea3148d37fecd Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Wed, 7 Jul 2021 18:50:59 -0700 Subject: [PATCH 19/23] Add in missing error response (cherry picked from commit 18741f4402c2096ba5ab01a19f522120374419bf) (cherry picked from commit 7a87490e16f6277be786936264cd53bec8d7942f) (cherry picked from commit 8f414a1f0e781da68f93f43ac9c101c310702867) --- openapi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/openapi.yaml b/openapi.yaml index ae17403..20057bb 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4228,6 +4228,7 @@ components: - invalid_charge_event - invalid_object - no_rates_returned + - default_resource_cannot_be_deleted description: The error code specified for the failed API Call list_account_settings_images_response_body: title: list_account_settings_images_response_body From 2e771c39709a0a407e0e84ef5b19ec9b1c786311 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Wed, 10 Nov 2021 14:38:42 -0500 Subject: [PATCH 20/23] More fields need to be nullable (cherry picked from commit 27dd7f03e20881be0e2410b945ee0277c4f12353) (cherry picked from commit cd6ed10ae46aa29f9ae56ae1d48cbc46aa2dbb04) (cherry picked from commit 202bf0e632ad7c90b6f0390cd2286566f87ddde6) --- openapi.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 20057bb..94769b8 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -9726,20 +9726,24 @@ components: type: string minLength: 0 readOnly: true + nullable: true example: 'Your item was delivered in or at the mailbox at 9:10 am on March' description: carrier status description ship_date: allOf: - $ref: '#/components/schemas/date_time' estimated_delivery_date: + nullable: true allOf: - $ref: '#/components/schemas/date_time' actual_delivery_date: + nullable: true allOf: - $ref: '#/components/schemas/date_time' exception_description: type: string readOnly: true + nullable: true minLength: 0 description: Exception description events: @@ -9780,14 +9784,6 @@ components: description: A track event required: - occurred_at - - city_locality - - state_province - - postal_code - - carrier_detail_code - - status_code - - status_description - - carrier_status_code - - carrier_status_description additionalProperties: false properties: occurred_at: @@ -9809,32 +9805,38 @@ components: city_locality: type: string readOnly: true + nullable: true example: AUSTIN minLength: 0 description: City locality state_province: type: string readOnly: true + nullable: true example: TX minLength: 2 description: State province postal_code: type: string readOnly: true + nullable: true example: 78756 minLength: 0 description: Postal code country_code: + nullable: true allOf: - $ref: '#/components/schemas/country_code' company_name: type: string readOnly: true + nullable: true example: Stamps.com minLength: 0 description: Company Name signer: type: string + nullable: true minLength: 0 readOnly: true description: Signer information @@ -9872,12 +9874,14 @@ components: latitude: type: number format: double + nullable: true minimum: -90 maximum: 90 description: Latitude coordinate of tracking event. longitude: type: number format: double + nullable: true minimum: -180 maximum: 180 description: Longitude coordinate of tracking event. From aabb556351d82fe2bf84e2e50a807d553a37186b Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Wed, 19 Jan 2022 12:29:01 -0500 Subject: [PATCH 21/23] Yet more fields need to be nullable (cherry picked from commit 0847e6e27ae4e35e965e01265375fe5e5a5ea950) (cherry picked from commit 76d3238da249b2d4a34e6c61ddab4549faec4103) (cherry picked from commit 485791ac471f8bc58e5fc639a66745c67bb8d1d8) --- openapi.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 94769b8..5b066f0 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -9711,6 +9711,7 @@ components: minLength: 0 description: Status description carrier_status_code: + nullable: true type: string readOnly: true minLength: 1 @@ -9730,6 +9731,7 @@ components: example: 'Your item was delivered in or at the mailbox at 9:10 am on March' description: carrier status description ship_date: + nullable: true allOf: - $ref: '#/components/schemas/date_time' estimated_delivery_date: From c331d61d7feb5fb9389094924485edd46cf3bc36 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Fri, 28 Jan 2022 18:19:04 -0500 Subject: [PATCH 22/23] Yet more nullable fields in the wild (cherry picked from commit 4c53e90ac5d75092a121fe22781c9def02e9078c) (cherry picked from commit fc873132de65312f96363967900feffec811f00d) (cherry picked from commit 270b6d6a20ea49efd615f6364676bb9fd9d69d96) --- openapi.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 5b066f0..7d3e393 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -9692,6 +9692,7 @@ components: - $ref: '#/components/schemas/tracking_number' tracking_url: type: string + nullable: true readOnly: true example: 'https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234' description: 'Carrier Tracking Url, if available' @@ -9801,6 +9802,7 @@ components: description: type: string readOnly: true + nullable: true minLength: 0 example: 'Delivered, In/At Mailbox' description: Event description @@ -9844,6 +9846,7 @@ components: description: Signer information event_code: type: string + nullable: true minLength: 0 description: Event Code carrier_detail_code: From 0a08ba23c25a2d4bcf1145b2932870a347e03027 Mon Sep 17 00:00:00 2001 From: Kendall Bennett Date: Tue, 26 Mar 2024 22:53:28 -0400 Subject: [PATCH 23/23] Fix up broken image_content_type and revert the shipping_address_to stuff to maintain binary compatibility for now. Might put that back later. --- openapi.yaml | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 7d3e393..4c45d9f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4273,14 +4273,11 @@ components: description: | Indicates whether this image is set as default. image_content_type: - allOf: - - type: string - enum: - - image/png - - image/jpeg - description: The image type - description: | - The file type of the image. + type: string + enum: + - image/png + - image/jpeg + description: The file type of the image. image_data: type: string example: >- @@ -4455,14 +4452,11 @@ components: description: | Indicates whether this image is set as default. image_content_type: - allOf: - - type: string - enum: - - image/png - - image/jpeg - description: The image type - description: | - The file type of the image. + type: string + enum: + - image/png + - image/jpeg + description: The file type of the image. image_data: type: string example: >- @@ -8134,11 +8128,11 @@ components: description: The current status of the shipment ship_to: allOf: - - $ref: '#/components/schemas/shipping_address_to' + - $ref: '#/components/schemas/address' description: The recipient's mailing address ship_from: allOf: - - $ref: '#/components/schemas/shipping_address' + - $ref: '#/components/schemas/address' description: > The shipment's origin address. If you frequently ship from the same location, consider [creating a @@ -8157,7 +8151,7 @@ components: `ship_from` must be specified. return_to: allOf: - - $ref: '#/components/schemas/shipping_address' + - $ref: '#/components/schemas/address' description: > The return address for this shipment. Defaults to the `ship_from` address.