Skip to content

Commit

Permalink
fixed openapi with endpoint placed security (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldisaro authored Jan 29, 2024
1 parent 46fdad6 commit c2949ac
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 79 deletions.
22 changes: 20 additions & 2 deletions openapi/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ host: api.io.pagopa.it
basePath: /api/v1
schemes:
- https
security:
- SubscriptionKey: []
paths:
/messages:
post:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -448,6 +458,8 @@ paths:
description: |
Upsert a logo for an Organization.
operationId: uploadOrganizationLogo
security:
- SubscriptionKey: []
parameters:
- name: body
in: body
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
22 changes: 20 additions & 2 deletions openapi/index.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ host: api.io.pagopa.it
basePath: "/api/v1"
schemes:
- https
security:
- SubscriptionKey: []
paths:
"/messages":
post:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -392,6 +402,8 @@ paths:
description: |
Upsert a logo for an Organization.
operationId: uploadOrganizationLogo
security:
- SubscriptionKey: []
parameters:
- name: body
in: body
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading

0 comments on commit c2949ac

Please sign in to comment.