Skip to content

Commit

Permalink
fix: refactored numerations and fix_payment option
Browse files Browse the repository at this point in the history
  • Loading branch information
valmoz authored Feb 15, 2022
1 parent f2e7985 commit d4d6911
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate-csharp-netcore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
node ./scripts/preprocess-spec.js
openapi-generator-cli generate -i ./openapi.yaml -g csharp-netcore -o generated/csharp-netcore/ -t ./templates/csharp-netcore --additional-properties=useDateTimeOffset=true,packageName=${PACKAGE_NAME},packageAuthors=${PACKAGE_AUTHORS},packageCompany=${PACKAGE_COMPANY},packageTitle=${PACKAGE_TITLE},packageVersion=${SDK_VERSION},targetFramework=${TARGET_FRAMEWORK},testTargetFramework=${TEST_TARGET_FRAMEWORK},multiTarget=true,licenseId=MIT --git-repo-id=${GIT_REPO_ID} --git-user-id=${GIT_USER_ID} --release-note=${RELEASE_NOTE} --http-user-agent=${USER_AGENT}
openapi-generator-cli generate -i ./openapi.yaml -g csharp-netcore -o generated/csharp-netcore/ -t ./templates/csharp-netcore --additional-properties=useDateTimeOffset=true,conditionalSerialization=true,packageName=${PACKAGE_NAME},packageAuthors=${PACKAGE_AUTHORS},packageCompany=${PACKAGE_COMPANY},packageTitle=${PACKAGE_TITLE},packageVersion=${SDK_VERSION},targetFramework=${TARGET_FRAMEWORK},testTargetFramework=${TEST_TARGET_FRAMEWORK},multiTarget=true,licenseId=MIT --git-repo-id=${GIT_REPO_ID} --git-user-id=${GIT_USER_ID} --release-note=${RELEASE_NOTE} --http-user-agent=${USER_AGENT}
- id: create-pr
name: Create Pull Request
Expand Down
2 changes: 2 additions & 0 deletions models/requests/CreateIssuedDocumentRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ type: object
properties:
data:
$ref: ../schemas/IssuedDocument.yaml
options:
$ref: ../schemas/IssuedDocumentOptions.yaml
2 changes: 2 additions & 0 deletions models/requests/ModifyIssuedDocumentRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ description: ''
properties:
data:
$ref: ../schemas/IssuedDocument.yaml
option:
$ref: ../schemas/EntityOptions.yaml
6 changes: 6 additions & 0 deletions models/schemas/IssuedDocumentOptions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
title: IssuedDocumentOptions
type: object
properties:
fix_payments:
type: boolean
description: Fixes your last payment amount to match your document total
8 changes: 3 additions & 5 deletions models/schemas/IssuedDocumentPreCreateInfo.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
type: object
title: IssuedDocumentPreCreateInfo
properties:
numerations:
type: object
description: Next numbers by year and numeration name (for the given document type).
$ref: ./Numeration.yaml
dn_numerations:
type: object
description: Next numbers by year and numeration name (for delivery_notes).
$ref: ./Numeration.yaml
default_values:
type: object
description: Default values for the document.
Expand Down Expand Up @@ -96,4 +95,3 @@ properties:
description: Vat types list.
items:
$ref: ./VatType.yaml
title: IssuedDocumentPreCreateInfo
5 changes: 5 additions & 0 deletions models/schemas/Numeration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: Numeration
type: object
additionalProperties:
type: object
$ref: ./NumerationItem.yaml
4 changes: 4 additions & 0 deletions models/schemas/NumerationItem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title: NumerationItem
type: object
additionalProperties:
type: integer
5 changes: 2 additions & 3 deletions models/schemas/ReceiptPreCreateInfo.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
type: object
description: ''
title: ReceiptPreCreateInfo
properties:
numerations:
type: object
description: Next number by year, receipt type and numeration name.
$ref: ./Numeration.yaml
numerations_list:
type: array
description: List of series used in the past.
Expand Down Expand Up @@ -36,4 +36,3 @@ required:
- payment_accounts_list
- categories_list
- vat_types_list
title: ReceiptPreCreateInfo
5 changes: 2 additions & 3 deletions models/schemas/ReceivedDocumentPreCreateInfo.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
type: object
description: ''
title: ReceivedDocumentPreCreateInfo
properties:
numerations:
type: object
description: Next number by year, receipt type and numeration name.
$ref: ./Numeration.yaml
numerations_list:
type: array
description: List of series used in the past.
Expand Down Expand Up @@ -36,4 +36,3 @@ required:
- payment_accounts_list
- categories_list
- vat_types_list
title: ReceivedDocumentPreCreateInfo

0 comments on commit d4d6911

Please sign in to comment.