diff --git a/openapi/index.yaml b/openapi/index.yaml index 275af88a..6a517932 100644 --- a/openapi/index.yaml +++ b/openapi/index.yaml @@ -101,8 +101,6 @@ host: api.io.pagopa.it basePath: /api/v1 schemes: - https -security: - - SubscriptionKey: [] paths: /messages: post: @@ -121,6 +119,8 @@ paths: (for the specified fiscal code) and that the `sender_allowed` field of the user's profile it set to `true`. + security: + - SubscriptionKey: [] parameters: - name: message in: body @@ -185,6 +185,8 @@ paths: the sender MUST call `getProfile` and check that the profile exists (for the specified fiscal code) and that the `sender_allowed` field of the user's profile it set to `true`. + security: + - SubscriptionKey: [] parameters: - $ref: '#/parameters/FiscalCode' - name: message @@ -252,6 +254,8 @@ paths: returned. With right permission and `ADVANCED` feature level type related to the previously submitted message, also read and payment status infos (when applicable) are returned. + security: + - SubscriptionKey: [] parameters: - $ref: '#/parameters/FiscalCode' - name: id @@ -312,6 +316,8 @@ paths: set fo `false` in case the service which is calling the API has been disabled by the user. + security: + - SubscriptionKey: [] responses: '200': description: Found. @@ -344,6 +350,8 @@ paths: Returns the preferences for the user identified by the provided fiscal code. The field `sender_allowed` is set fo `false` in case the service which is calling the API has been disabled by the user. + security: + - SubscriptionKey: [] responses: '200': description: Found. @@ -416,6 +424,8 @@ paths: while preserving optimization of API calls and data accuracy. Organizations allowed are required to query this feed everyday. + security: + - SubscriptionKey: [] responses: '200': description: Found. @@ -448,6 +458,8 @@ paths: description: | Upsert a logo for an Organization. operationId: uploadOrganizationLogo + security: + - SubscriptionKey: [] parameters: - name: body in: body @@ -477,6 +489,8 @@ paths: operationId: getServiceActivationByPOST summary: Get a Service Activation for a User description: Returns the current Activation for a couple Service/User + security: + - SubscriptionKey: [] responses: '200': description: Found. @@ -511,6 +525,8 @@ paths: operationId: upsertServiceActivation summary: Upsert a Service Activation for a User description: Create or update an Activation for a couple Service/User + security: + - SubscriptionKey: [] responses: '200': description: Found. @@ -624,6 +640,8 @@ paths: summary: Retrieve all service topics description: Retrieve all service topics operationId: getServiceTopics + security: + - SubscriptionKey: [] responses: '200': description: Service topics fetched successfully diff --git a/openapi/index.yaml.template b/openapi/index.yaml.template index d60bbee7..d665ee4d 100644 --- a/openapi/index.yaml.template +++ b/openapi/index.yaml.template @@ -102,8 +102,6 @@ host: api.io.pagopa.it basePath: "/api/v1" schemes: - https -security: - - SubscriptionKey: [] paths: "/messages": post: @@ -116,6 +114,8 @@ paths: the sender MUST call `getProfile` and check that the profile exists (for the specified fiscal code) and that the `sender_allowed` field of the user's profile it set to `true`. + security: + - SubscriptionKey: [] parameters: - name: message in: body @@ -171,6 +171,8 @@ paths: the sender MUST call `getProfile` and check that the profile exists (for the specified fiscal code) and that the `sender_allowed` field of the user's profile it set to `true`. + security: + - SubscriptionKey: [] parameters: - $ref: "#/parameters/FiscalCode" - name: message @@ -229,6 +231,8 @@ paths: returned. With right permission and `ADVANCED` feature level type related to the previously submitted message, also read and payment status infos (when applicable) are returned. + security: + - SubscriptionKey: [] parameters: - $ref: "#/parameters/FiscalCode" - name: id @@ -277,6 +281,8 @@ paths: Returns the preferences for the user identified by the fiscal code provided in the request body. The field `sender_allowed` is set fo `false` in case the service which is calling the API has been disabled by the user. + security: + - SubscriptionKey: [] responses: "200": description: Found. @@ -309,6 +315,8 @@ paths: Returns the preferences for the user identified by the provided fiscal code. The field `sender_allowed` is set fo `false` in case the service which is calling the API has been disabled by the user. + security: + - SubscriptionKey: [] responses: "200": description: Found. @@ -359,6 +367,8 @@ paths: This feed serves the purpose of minimizing data processing activities while preserving optimization of API calls and data accuracy. Organizations allowed are required to query this feed everyday. + security: + - SubscriptionKey: [] responses: "200": description: Found. @@ -392,6 +402,8 @@ paths: description: | Upsert a logo for an Organization. operationId: uploadOrganizationLogo + security: + - SubscriptionKey: [] parameters: - name: body in: body @@ -422,6 +434,8 @@ paths: summary: Get a Service Activation for a User description: |- Returns the current Activation for a couple Service/User + security: + - SubscriptionKey: [] responses: "200": description: Found. @@ -457,6 +471,8 @@ paths: summary: Upsert a Service Activation for a User description: |- Create or update an Activation for a couple Service/User + security: + - SubscriptionKey: [] responses: "200": description: Found. @@ -568,6 +584,8 @@ paths: summary: Retrieve all service topics description: Retrieve all service topics operationId: getServiceTopics + security: + - SubscriptionKey: [] responses: '200': description: Service topics fetched successfully diff --git a/package.json b/package.json index 7b6eab40..fe129537 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "devDependencies": { "@azure/functions": "^3.2.0", "@pagopa/eslint-config": "^1.3.1", - "@pagopa/openapi-codegen-ts": "^10.0.5", + "@pagopa/openapi-codegen-ts": "^13.1.0", "@types/cors": "^2.8.4", "@types/documentdb": "^1.10.5", "@types/express": "^4.16.0", diff --git a/yarn.lock b/yarn.lock index b1d10ae3..046c2049 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,6 +10,38 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" +"@apidevtools/json-schema-ref-parser@^9.0.6": + version "9.1.2" + resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.1.2.tgz#8ff5386b365d4c9faa7c8b566ff16a46a577d9b8" + integrity sha512-r1w81DpR+KyRWd3f+rk6TNqMgedmAxZP5v5KWlXQWlgMUUtyEJch0DKEci1SorPMiSeM8XPl7MZ3miJ60JIpQg== + dependencies: + "@jsdevtools/ono" "^7.1.3" + "@types/json-schema" "^7.0.6" + call-me-maybe "^1.0.1" + js-yaml "^4.1.0" + +"@apidevtools/openapi-schemas@^2.0.4": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz#9fa08017fb59d80538812f03fc7cac5992caaa17" + integrity sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ== + +"@apidevtools/swagger-methods@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz#b789a362e055b0340d04712eafe7027ddc1ac267" + integrity sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg== + +"@apidevtools/swagger-parser@10.0.3": + version "10.0.3" + resolved "https://registry.yarnpkg.com/@apidevtools/swagger-parser/-/swagger-parser-10.0.3.tgz#32057ae99487872c4dd96b314a1ab4b95d89eaf5" + integrity sha512-sNiLY51vZOmSPFZA5TF35KZ2HbgYklQnTSDnkghamzLb3EkNtcQnrBQEj5AOCxHpTtXpqMCRM1CrmV2rG6nw4g== + dependencies: + "@apidevtools/json-schema-ref-parser" "^9.0.6" + "@apidevtools/openapi-schemas" "^2.0.4" + "@apidevtools/swagger-methods" "^3.0.2" + "@jsdevtools/ono" "^7.1.3" + call-me-maybe "^1.0.1" + z-schema "^5.0.1" + "@azure/abort-controller@^1.0.0", "@azure/abort-controller@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@azure/abort-controller/-/abort-controller-1.1.0.tgz#788ee78457a55af8a1ad342acb182383d2119249" @@ -626,6 +658,11 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" +"@jsdevtools/ono@^7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" + integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1084,21 +1121,22 @@ unified "^9.2.2" winston "^3.1.0" -"@pagopa/openapi-codegen-ts@^10.0.5": - version "10.1.0" - resolved "https://registry.yarnpkg.com/@pagopa/openapi-codegen-ts/-/openapi-codegen-ts-10.1.0.tgz#947712e362d12accb78dd789e5da566627d8c973" - integrity sha512-hWhpM0Vd07DnxUrZwRU/uSg78uSpwaTu4Q451+sWt48Mn+2AYdY130rL5o/wuiitmXBNEjz8LslLgR+qEy/KhQ== +"@pagopa/openapi-codegen-ts@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@pagopa/openapi-codegen-ts/-/openapi-codegen-ts-13.1.0.tgz#b5dca49eec448474f2639516d05f42e78eab0a1c" + integrity sha512-VKXkZtIGzklWgRK/GzsmefnHW9Mc9j0tukDxgRz4T3BfKXX0xoy5t0Es6AygRmg2WhF998wSVoQZF/9yhSgEZA== dependencies: - "@pagopa/ts-commons" "^10.3.0" + "@pagopa/ts-commons" "^10.15.0" fs-extra "^6.0.0" nunjucks "^3.2.3" + openapi-types "^10.0.0" prettier "^1.12.1" safe-identifier "^0.4.2" - swagger-parser "^7.0.0" + swagger-parser "^10.0.3" write-yaml-file "^4.1.3" yargs "^15.0.1" -"@pagopa/ts-commons@^10.0.0", "@pagopa/ts-commons@^10.3.0": +"@pagopa/ts-commons@^10.0.0", "@pagopa/ts-commons@^10.15.0": version "10.15.0" resolved "https://registry.yarnpkg.com/@pagopa/ts-commons/-/ts-commons-10.15.0.tgz#8e3030a2ebc16c3edb5ef99962c6e8d534826957" integrity sha512-MTmD0geIN9L9vnEYjPTE7v6Bu+IRTFMre+3K4LWYjy1AaRmYcpSrc9HTZgyCRW8uLCvw1BmDKcKtSiETM817kw== @@ -1414,6 +1452,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== +"@types/json-schema@^7.0.6": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -2738,6 +2781,11 @@ comma-separated-tokens@^1.0.1: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw== +commander@^10.0.0: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + commander@^2.7.1, commander@^2.9.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -5841,7 +5889,7 @@ js-yaml@^3.12.1, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.0.0: +js-yaml@^4.0.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -5948,15 +5996,6 @@ json-schema-ref-parser@^6.1.0: js-yaml "^3.12.1" ono "^4.0.11" -json-schema-ref-parser@^7.1.0: - version "7.1.4" - resolved "https://registry.yarnpkg.com/json-schema-ref-parser/-/json-schema-ref-parser-7.1.4.tgz#abb3f2613911e9060dc2268477b40591753facf0" - integrity sha512-AD7bvav0vak1/63w3jH8F7eHId/4E4EPdMAEZhGxtjktteUv9dnNB/cJy6nVnMyoTPBJnLwFK6tiQPSTeleCtQ== - dependencies: - call-me-maybe "^1.0.1" - js-yaml "^3.13.1" - ono "^6.0.0" - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -6035,16 +6074,6 @@ jsonpath-plus@^5.1.0: resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-5.1.0.tgz#2fc4b2e461950626c98525425a3a3518b85af6c3" integrity sha512-890w2Pjtj0iswAxalRlt2kHthi6HKrXEfZcn+ZNZptv7F3rUGIeDuZo+C+h4vXBHLEsVjJrHeCm35nYeZLzSBQ== -jsonschema-draft4@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/jsonschema-draft4/-/jsonschema-draft4-1.0.0.tgz#f0af2005054f0f0ade7ea2118614b69dc512d865" - integrity sha512-sBV3UnQPRiyCTD6uzY/Oao2Yohv6KKgQq7zjPwjFHeR6scg/QSXnzDxdugsGaLQDmFUrUlTbMYdEE+72PizhGA== - -jsonschema@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.2.4.tgz#a46bac5d3506a254465bc548876e267c6d0d6464" - integrity sha512-lz1nOH69GbsVHeVgEdvyavc/33oymY1AZwtePMiMj4HZPMbP5OIKK3zT9INMWjwua/V4Z4yq7wSlBbSG+g4AEw== - jsprim@^1.2.2: version "1.4.2" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" @@ -7417,29 +7446,10 @@ ono@^4.0.11: dependencies: format-util "^1.0.3" -ono@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/ono/-/ono-5.1.0.tgz#8cafa7e56afa2211ad63dd2eb798427e64f1a070" - integrity sha512-GgqRIUWErLX4l9Up0khRtbrlH8Fyj59A0nKv8V6pWEto38aUgnOGOOF7UmgFFLzFnDSc8REzaTXOc0hqEe7yIw== - -ono@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ono/-/ono-6.0.1.tgz#1bc14ffb8af1e5db3f7397f75b88e4a2d64bbd71" - integrity sha512-5rdYW/106kHqLeG22GE2MHKq+FlsxMERZev9DCzQX1zwkxnFwBivSn5i17a5O/rDmOJOdf4Wyt80UZljzx9+DA== - -openapi-schema-validation@^0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/openapi-schema-validation/-/openapi-schema-validation-0.4.2.tgz#895c29021be02e000f71c51f859da52118eb1e21" - integrity sha512-K8LqLpkUf2S04p2Nphq9L+3bGFh/kJypxIG2NVGKX0ffzT4NQI9HirhiY6Iurfej9lCu7y4Ndm4tv+lm86Ck7w== - dependencies: - jsonschema "1.2.4" - jsonschema-draft4 "^1.0.0" - swagger-schema-official "2.0.0-bab6bed" - -openapi-types@^1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/openapi-types/-/openapi-types-1.3.5.tgz#6718cfbc857fe6c6f1471f65b32bdebb9c10ce40" - integrity sha512-11oi4zYorsgvg5yBarZplAqbpev5HkuVNPlZaPTknPDzAynq+lnJdXAmruGWP0s+dNYZS7bjM+xrTpJw7184Fg== +openapi-types@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/openapi-types/-/openapi-types-10.0.0.tgz#0debbf663b2feed0322030b5b7c9080804076934" + integrity sha512-Y8xOCT2eiKGYDzMW9R4x5cmfc3vGaaI4EL2pwhDmodWw1HlK18YcZ4uJxc7Rdp7/gGzAygzH9SXr6GKYIXbRcQ== opener@^1.5.2: version "1.5.2" @@ -9229,24 +9239,12 @@ swagger-methods@^1.0.0: resolved "https://registry.yarnpkg.com/swagger-methods/-/swagger-methods-1.0.8.tgz#8baf37ee861d3c72ff7b2faad6d74c60b336e2ed" integrity sha512-G6baCwuHA+C5jf4FNOrosE4XlmGsdjbOjdBK4yuiDDj/ro9uR4Srj3OR84oQMT8F3qKp00tYNv0YN730oTHPZA== -swagger-methods@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/swagger-methods/-/swagger-methods-2.0.2.tgz#5891d5536e54d5ba8e7ae1007acc9170f41c9590" - integrity sha512-/RNqvBZkH8+3S/FqBPejHxJxZenaYq3MrpeXnzi06aDIS39Mqf5YCUNb/ZBjsvFFt8h9FxfKs8EXPtcYdfLiRg== - -swagger-parser@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/swagger-parser/-/swagger-parser-7.0.1.tgz#da6892673b66b0cd831b26d63ce5914eeda7ee47" - integrity sha512-73FAlW1xqtkGLsxp41C4ASXPyEeJ9h38SGJRSDH0gSImjG5XzlbFb2EWsnhakLZfKOG/VsjzKQjO5aenmDSw/g== +swagger-parser@^10.0.3: + version "10.0.3" + resolved "https://registry.yarnpkg.com/swagger-parser/-/swagger-parser-10.0.3.tgz#04cb01c18c3ac192b41161c77f81e79309135d03" + integrity sha512-nF7oMeL4KypldrQhac8RyHerJeGPD1p2xDh900GPvc+Nk7nWP6jX2FcC7WmkinMoAmoO774+AFXcWsW8gMWEIg== dependencies: - call-me-maybe "^1.0.1" - json-schema-ref-parser "^7.1.0" - ono "^5.0.1" - openapi-schema-validation "^0.4.2" - openapi-types "^1.3.5" - swagger-methods "^2.0.0" - swagger-schema-official "2.0.0-bab6bed" - z-schema "^4.1.0" + "@apidevtools/swagger-parser" "10.0.3" swagger-schema-official@2.0.0-bab6bed: version "2.0.0-bab6bed" @@ -9904,7 +9902,7 @@ validator@^10.0.0: resolved "https://registry.yarnpkg.com/validator/-/validator-10.11.0.tgz#003108ea6e9a9874d31ccc9e5006856ccd76b228" integrity sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw== -validator@^13.6.0, validator@^13.7.0: +validator@^13.7.0: version "13.9.0" resolved "https://registry.yarnpkg.com/validator/-/validator-13.9.0.tgz#33e7b85b604f3bbce9bb1a05d5c3e22e1c2ff855" integrity sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA== @@ -10345,13 +10343,13 @@ z-schema@^3.22.0: optionalDependencies: commander "^2.7.1" -z-schema@^4.1.0: - version "4.2.4" - resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-4.2.4.tgz#73102a49512179b12a8ec50b1daa676b984da6e4" - integrity sha512-YvBeW5RGNeNzKOUJs3rTL4+9rpcvHXt5I051FJbOcitV8bl40pEfcG0Q+dWSwS0/BIYrMZ/9HHoqLllMkFhD0w== +z-schema@^5.0.1: + version "5.0.6" + resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-5.0.6.tgz#46d6a687b15e4a4369e18d6cb1c7b8618fc256c5" + integrity sha512-+XR1GhnWklYdfr8YaZv/iu+vY+ux7V5DS5zH1DQf6bO5ufrt/5cgNhVO5qyhsjFXvsqQb/f08DWE9b6uPscyAg== dependencies: lodash.get "^4.4.2" lodash.isequal "^4.5.0" - validator "^13.6.0" + validator "^13.7.0" optionalDependencies: - commander "^2.7.1" + commander "^10.0.0"