Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autogenerate the SDK from the OpenAPI spec (3.0.0) #102

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
73e9718
Use nullable reference types and datetimeoffset
AndrewBenzSW Jul 16, 2024
78b6c05
Add ability to manually publish a beta version
AndrewBenzSW Jul 16, 2024
67fdbd9
Merge branch 'main' into 3.0.0
AndrewBenzSW Jul 16, 2024
0f235e1
Regenerate the API methods and models
AndrewBenzSW Jul 16, 2024
5773578
Add ToString comment for enum and mark some strings as nullable
AndrewBenzSW Jul 16, 2024
0467687
Address some code issues
AndrewBenzSW Jul 16, 2024
f05bd4a
Mark non-required types as nullable
AndrewBenzSW Jul 16, 2024
7b3cb74
Add required keyword to required properties
AndrewBenzSW Jul 16, 2024
ecdb325
Mark API method parameters as optional
AndrewBenzSW Jul 16, 2024
db17652
Remove blank line
AndrewBenzSW Jul 17, 2024
730bb77
Don't require readonly properties
AndrewBenzSW Jul 17, 2024
0606dff
Better handle reaonly and writeonly properties
AndrewBenzSW Jul 17, 2024
f044701
Relax private setters on readonly properties
AndrewBenzSW Jul 19, 2024
61b665a
Allow SDK to handle No Content (204) responses
joshuaflanagan Jul 22, 2024
f7cbdf8
bump version for beta5
joshuaflanagan Jul 22, 2024
a137a3f
Remove version from generated files
joshuaflanagan Jul 23, 2024
9a7c903
Regenerated for spec 202407231507
joshuaflanagan Jul 23, 2024
2a1f889
Verify can deserialize create label response
joshuaflanagan Jul 23, 2024
872dbeb
Version 3.0.0-beta.6
joshuaflanagan Jul 23, 2024
77381c4
Regenerate from spec v1.19.1, version 3.0.0-beta.7
mattburton Jul 24, 2024
f61a6ef
Regenerate from spec v1.19.2, version 3.0.0-beta.8
mattburton Jul 24, 2024
b5347fc
Regenerate from 1.19.3 spec
joshuaflanagan Jul 28, 2024
a8e56bc
Version 3.0.0-beta.9
joshuaflanagan Jul 28, 2024
2765a54
feat: modify request
jpill Jul 22, 2024
e99cb83
Bump the version
AndrewBenzSW Aug 22, 2024
0c7d4a3
Temporarily disable code coverage reporting since Coveralls is return…
AndrewBenzSW Aug 22, 2024
bbb5bb0
Merge branch 'main' into 3.0.0
AndrewBenzSW Aug 26, 2024
b4fee8b
Bump version
AndrewBenzSW Aug 26, 2024
f0e0aa8
Update SE API version
AndrewBenzSW Sep 11, 2024
c8b1523
Regenerate from spec v1.20.5, version 3.0.0-beta.13
mattburton Oct 3, 2024
ef486d5
Add optional error properties
AndrewBenzSW Oct 8, 2024
e4146a5
Updated for latest spec
joshuaflanagan Oct 9, 2024
8bf353a
Update version
joshuaflanagan Oct 9, 2024
b76061a
added A4 and A6 to label layout enum
Bibhusan-Shah Oct 16, 2024
af4f4c7
Merge pull request #116 from ShipEngine/bshah/adding-label-layouts
Bibhusan-Shah Oct 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 18 additions & 18 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,24 @@ jobs:
ls -Rlh ShipEngineSDK.Test/TestResults/*/coverage.info
cat ShipEngineSDK.Test/TestResults/*/coverage.info > ShipEngineSDK.Test/TestResults/lcov.info

- name: Send code coverage results to Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: run-${{ matrix.test_number }}
path-to-lcov: ShipEngineSDK.Test/TestResults/lcov.info

coverage:
name: Code Coverage
needs: dot_net_core_test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
# - name: Send code coverage results to Coveralls
# uses: coverallsapp/[email protected]
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# parallel: true
# flag-name: run-${{ matrix.test_number }}
# path-to-lcov: ShipEngineSDK.Test/TestResults/lcov.info

# coverage:
# name: Code Coverage
# needs: dot_net_core_test
# runs-on: ubuntu-latest
# steps:
# - name: Coveralls Finished
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.github_token }}
# parallel-finished: true

nuget-deploy:
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion .openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@
**/*.csproj
appveyor.yml
git_push.sh
ShipEngineSDK/Api/IApi.cs
ShipEngineSDK/Client/*.cs
ShipEngineSDK/Extensions/*.cs

# We should re-enable these eventually
README.md
docs/*.md
*/README.md
docs/**/*
ShipEngineSDK.Test/*/*.cs
api/**
.gitignore
Expand Down
12 changes: 11 additions & 1 deletion .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ ShipEngineSDK/Api/TokensApi.cs
ShipEngineSDK/Api/TrackingApi.cs
ShipEngineSDK/Api/WarehousesApi.cs
ShipEngineSDK/Api/WebhooksApi.cs
ShipEngineSDK/Model/AbstractOpenAPISchema.cs
ShipEngineSDK/Model/AccountSettings.cs
ShipEngineSDK/Model/AccountSettingsImages.cs
ShipEngineSDK/Model/AddFundsToCarrierRequestBody.cs
Expand All @@ -37,6 +36,7 @@ ShipEngineSDK/Model/AddressValidationStatus.cs
ShipEngineSDK/Model/AdvancedShipmentOptions.cs
ShipEngineSDK/Model/AdvancedShipmentOptionsDangerousGoodsContact.cs
ShipEngineSDK/Model/AdvancedShipmentOptionsFedexFreight.cs
ShipEngineSDK/Model/AdvancedShipmentOptionsWindsorFrameworkDetails.cs
ShipEngineSDK/Model/AllowedIncoterms.cs
ShipEngineSDK/Model/AlternativeIdentifier.cs
ShipEngineSDK/Model/AlternativeIdentifiers.cs
Expand Down Expand Up @@ -164,6 +164,7 @@ ShipEngineSDK/Model/GetServicePointsRequestBody.cs
ShipEngineSDK/Model/GetServicePointsRequestBodyAddress.cs
ShipEngineSDK/Model/GetServicePointsRequestBodyProvidersInner.cs
ShipEngineSDK/Model/GetServicePointsRequestBodyShipment.cs
ShipEngineSDK/Model/GetServicePointsRequestBodyShipmentPackagesInner.cs
ShipEngineSDK/Model/GetShipmentByExternalIdResponseBody.cs
ShipEngineSDK/Model/GetShipmentByIdResponseBody.cs
ShipEngineSDK/Model/GetTrackingLogFromLabelResponseBody.cs
Expand All @@ -182,7 +183,9 @@ ShipEngineSDK/Model/LabelDownloadType.cs
ShipEngineSDK/Model/LabelFormat.cs
ShipEngineSDK/Model/LabelLayout.cs
ShipEngineSDK/Model/LabelMessages.cs
ShipEngineSDK/Model/LabelPackage.cs
ShipEngineSDK/Model/LabelPackagesInner.cs
ShipEngineSDK/Model/LabelRequest.cs
ShipEngineSDK/Model/LabelStatus.cs
ShipEngineSDK/Model/Link.cs
ShipEngineSDK/Model/ListAccountImagesResponseBody.cs
Expand Down Expand Up @@ -243,6 +246,9 @@ ShipEngineSDK/Model/ProcessBatchRequestBody.cs
ShipEngineSDK/Model/Products.cs
ShipEngineSDK/Model/PurchaseLabelWithoutShipment.cs
ShipEngineSDK/Model/Rate.cs
ShipEngineSDK/Model/RateDetail.cs
ShipEngineSDK/Model/RateDetailAttributes.cs
ShipEngineSDK/Model/RateDetailType.cs
ShipEngineSDK/Model/RateEstimate.cs
ShipEngineSDK/Model/RateEstimateByCarrierId.cs
ShipEngineSDK/Model/RateEstimateByCarrierIds.cs
Expand All @@ -254,6 +260,7 @@ ShipEngineSDK/Model/RateRequestOptions.cs
ShipEngineSDK/Model/RateRequestRateOptions.cs
ShipEngineSDK/Model/RateResponse.cs
ShipEngineSDK/Model/RateResponseStatus.cs
ShipEngineSDK/Model/RateShipmentRequest.cs
ShipEngineSDK/Model/RateType.cs
ShipEngineSDK/Model/RatesInformation.cs
ShipEngineSDK/Model/ReasonCode.cs
Expand All @@ -272,13 +279,16 @@ ShipEngineSDK/Model/ShipmentRequest.cs
ShipEngineSDK/Model/ShipmentStatus.cs
ShipEngineSDK/Model/ShipmentsSortBy.cs
ShipEngineSDK/Model/ShippingAddress.cs
ShipEngineSDK/Model/ShippingAddressFrom.cs
ShipEngineSDK/Model/ShippingAddressTo.cs
ShipEngineSDK/Model/SmartPostHub.cs
ShipEngineSDK/Model/SortDir.cs
ShipEngineSDK/Model/StatusCode.cs
ShipEngineSDK/Model/StatusDetailCode.cs
ShipEngineSDK/Model/Tag.cs
ShipEngineSDK/Model/TagShipmentResponseBody.cs
ShipEngineSDK/Model/TaxIdentifier.cs
ShipEngineSDK/Model/TaxType.cs
ShipEngineSDK/Model/TaxableEntityType.cs
ShipEngineSDK/Model/TokensGetEphemeralTokenResponseBodyYaml.cs
ShipEngineSDK/Model/TrackEvent.cs
Expand Down
79 changes: 71 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Changelog


## 1.0.0

### Features
Expand All @@ -16,15 +15,13 @@ Implement the following SDK methods.
- `CreateLabelFromRate`
- `GetRatesWithShipmentDetails`


## 1.0.7

### Features

Implement the following SDK methods.
- `CreateImplicitManifest`


- `CreateImplicitManifest`

## 1.1.0

Expand All @@ -41,7 +38,6 @@ Rename LabelDownload method to the more generic Download

Some documentation linking errors and minor typos


## 1.1.1

### Added
Expand All @@ -52,7 +48,6 @@ Some documentation linking errors and minor typos

The Customs Item Quantity type has been changed to integer type for CreateLabelFromShipmentDetails model.


## 1.1.2

### Fixed
Expand Down Expand Up @@ -150,7 +145,7 @@ Updated nuget package dependencies

### Added

- Created new SDK methods for the entire API that sit next to the pre-existing methods. The pre-existing methods will be deprecated eventually.
- Created new SDK methods for the entire API that sit next to the pre-existing methods. The pre-existing methods will be deprecated eventually.

## 2.2.0

Expand All @@ -175,5 +170,73 @@ Fixed handling of No Content responses

- Added ability to scope request modifiers by using the `.WithRequestModifier()` method instead of the `.ModifyRequest` property.
This will allow consumers to modify a single request without affecting any other consumers of the client. It also allows for
multiple modifiers to be added. For example, a modifier could be added at the global level that applies to all requests and then
multiple modifiers to be added. For example, a modifier could be added at the global level that applies to all requests and then
another modifier can be added for a single request.

## 3.0.0-beta.1

### Added

- Created new SDK methods for the entire API that sit next to the pre-existing methods. The pre-existing methods will be deprecated eventually.

## 3.0.0-beta.2

### Changed

- Add more explicit nullable reference types

## 3.0.0-beta.3

### Changed

- Don't require any properties for deserialization so that small API changes don't completely break consumers
- Don't try to serialize read-only properties
- Don't try to deserialize write-only properties

## 3.0.0-beta.4

### Changed

- Make setters on readonly properties public

## 3.0.0-beta.10

### Changed

- Allow requests to be modified before being sent

## 3.0.0-beta.11

### Changed

- Added ability to scope request modifiers by using the `.WithRequestModifier()` method instead of the `.ModifyRequest` property.
This will allow consumers to modify a single request without affecting any other consumers of the client. It also allows for
multiple modifiers to be added. For example, a modifier could be added at the global level that applies to all requests and then
another modifier can be added for a single request.

## 3.0.0-beta.12

### Changed

- Updated to ShipEngine API 1.1.202409060709

## 3.0.0-beta.14

### Changed

- Updated to ShipEngine API 1.1.202410081510
- Add optional error properties, like field_name

## 3.0.0-beta.15

### Changed

- Updated to ShipEngine API 1.1.202410092210
- AdvancedOptions now allow passing arbitrary key/values via AdditionalProperties

## 3.0.0-beta.16

### Added

- Updated to ShipEngine API 1.1.202410161910
- Added A4 and A6 as options for label layouts
6 changes: 2 additions & 4 deletions ShipEngineSDK.Test/Helpers/MockShipEngineFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ public MockShipEngineFixture(Config config)
};
HttpClient = new HttpClient(MockHandler.Object);

ShipEngine = new ShipEngine(config)
{
_client = ShipEngineClient.ConfigureHttpClient(config, HttpClient)
};
var client = ShipEngineClient.ConfigureHttpClient(config, HttpClient);
ShipEngine = new ShipEngine(config, client);

JsonSerializerOptions = new JsonSerializerOptions()
{
Expand Down
Loading
Loading