Skip to content

Commit

Permalink
Merge pull request #5 from pagopa/finishing-APIs
Browse files Browse the repository at this point in the history
Adding all the APIs
  • Loading branch information
FedericoRuzzier authored Nov 3, 2022
2 parents d4a146f + 9356147 commit 69fc9b3
Show file tree
Hide file tree
Showing 15 changed files with 692 additions and 69 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ See the [Openapi here](https://github.com/pagopa/poc-quarkus/openapi/openapi.jso

## Contributors 👥

Created by PagoPa S.p.A
Made with ❤️ by PagoPa S.p.A

### Mainteiners

Expand Down
58 changes: 56 additions & 2 deletions api-test/poc-quarkusCollection.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"method": "GET",
"header": [],
"url": {
"raw": "{{url}}/openapi.json",
"raw": "{{url}}/openapi",
"host": [
"{{url}}"
],
"path": [
"openapi.json"
"openapi"
]
}
},
Expand All @@ -57,6 +57,60 @@
}
},
"response": []
},
{
"name": "getOrganization",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{url}}/organizations/mockOrganizationFiscalCode",
"host": [
"{{url}}"
],
"path": [
"organizations",
"mockOrganizationFiscalCode"
]
}
},
"response": []
},
{
"name": "removeOrganization",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{url}}/organizations/mockOrganizationFiscalCode",
"host": [
"{{url}}"
],
"path": [
"organizations",
"mockOrganizationFiscalCode"
]
}
},
"response": []
},
{
"name": "getOrganizations",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{url}}/organizations/",
"host": [
"{{url}}"
],
"path": [
"organizations",
""
]
}
},
"response": []
}
]
}
199 changes: 192 additions & 7 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,102 @@
}
}
},
"/organizations": {
"get": {
"tags": [
"Enrollments Controller"
],
"responses": {
"200": {
"description": "Obtained all enrollments.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OrganizationModelResponse"
}
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json": {
"schema": {}
}
}
},
"500": {
"description": "Service unavailable.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
}
}
}
}
},
"/organizations/{organizationFiscalCode}": {
"get": {
"tags": [
"Enrollments Controller"
],
"parameters": [
{
"name": "organizationFiscalCode",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Obtained single enrollment.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OrganizationModelResponse"
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json": {
"schema": {}
}
}
},
"404": {
"description": "Not found the enroll service.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
}
},
"500": {
"description": "Service unavailable.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
}
}
}
},
"post": {
"tags": [
"Enrollments Controller"
Expand All @@ -51,27 +146,90 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OrganizationEntity"
"$ref": "#/components/schemas/OrganizationModelResponse"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {}
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
}
}
}
},
"delete": {
"tags": [
"Enrollments Controller"
],
"parameters": [
{
"name": "organizationFiscalCode",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Request deleted.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OrganizationModelResponse"
}
}
}
},
"401": {
"description": "Unauthourized",
"description": "Unauthorized.",
"content": {
"application/json": {}
"application/json": {
"schema": {}
}
}
},
"404": {
"description": "Not found the creditor institution.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
}
},
"500": {
"description": "Internal server error",
"description": "Service unavailable.",
"content": {
"application/json": {}
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
}
}
}
Expand All @@ -94,14 +252,41 @@
}
}
},
"OrganizationEntity": {
"LocalDateTime": {
"format": "date-time",
"type": "string",
"example": "2022-03-10T12:15:50"
},
"OrganizationModelResponse": {
"type": "object",
"properties": {
"organizationFiscalCode": {
"type": "string"
},
"organizationOnboardingDate": {
"$ref": "#/components/schemas/LocalDateTime"
}
}
},
"ProblemJson": {
"type": "object",
"properties": {
"title": {
"description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable",
"type": "string"
},
"status": {
"format": "int32",
"description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
"maximum": 600,
"minimum": 100,
"type": "integer",
"example": 200
},
"detail": {
"description": "A human readable explanation specific to this occurrence of the problem.",
"type": "string",
"example": "There was an error processing the request"
}
}
}
Expand Down
Loading

0 comments on commit 69fc9b3

Please sign in to comment.