diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dd36cb..e281c9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,13 +8,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 # Changelog -## [1.2.0] - 2023-10-04 +## [1.2.0] - 2023-10-10 ### Added - Added project name to Sonar Cloud properties. - Added Suppliers and Customers fields for logic filtering. - Added new client ID to get roles from the newly published Country Risk app. -- Added new file for [Standard Api Documentation](docs/swagger/sharing_controller.yml) +- Added new file for [Standard Api Documentation Controller](docs/swagger/sharing_controller.yml) ### Changed - Mapped between API and new Data Model for getting Suppliers and Customers. diff --git a/docs/swagger/full_openapi.yml b/docs/swagger/full_openapi.yml deleted file mode 100644 index cab1b12..0000000 --- a/docs/swagger/full_openapi.yml +++ /dev/null @@ -1,1029 +0,0 @@ -openapi: 3.0.1 -info: - title: VAS API - description: Swagger documentation for the Value Added Services APIs - version: '1.0' -servers: - - url: / -security: - - open_id_scheme: - - read - - write -paths: - /api/dashboard/updateReports: - put: - tags: - - Dashboard Controller - summary: Update Reports that - operationId: updateReports - parameters: - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ReportDTO' - required: true - responses: - '200': - description: Reports updated with success - content: - '*/*': - schema: - $ref: '#/components/schemas/ResponseMessage' - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/uploadCsv: - post: - tags: - - Dashboard Controller - summary: Inserts information from an CSV file into the database, with the associated user - operationId: uploadFile - parameters: - - name: ratingName - in: header - required: true - schema: - type: string - - name: year - in: header - required: true - schema: - type: integer - format: int32 - - name: type - in: header - required: true - schema: - type: string - - name: companyUser - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - requestBody: - content: - multipart/form-data: - schema: - type: object - properties: - file: - type: string - format: binary - responses: - '200': - description: CSV file uploaded with success - content: - '*/*': - schema: - $ref: '#/components/schemas/ResponseMessage' - '400': - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ResponseMessage' - '401': - description: Authentication Required - content: - '*/*': - schema: - $ref: '#/components/schemas/ResponseMessage' - '500': - description: Unexpected Error - content: - '*/*': - schema: - $ref: '#/components/schemas/ResponseMessage' - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/shareReport: - post: - tags: - - Dashboard Controller - summary: Share Reports - operationId: shareReport - parameters: - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ReportDTO' - required: true - responses: - '200': - description: Reports shared with success - content: - '*/*': - schema: - $ref: '#/components/schemas/ResponseMessage' - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/saveUserRanges: - post: - tags: - - Dashboard Controller - summary: Saves the current user ranges - operationId: saveRanges - parameters: - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - requestBody: - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/RangeDTO' - maxItems: 3 - required: true - responses: - '200': - description: Ranges saved with success - content: - '*/*': - schema: - $ref: '#/components/schemas/ResponseMessage' - '400': - description: Bad Request - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/saveReports: - post: - tags: - - Dashboard Controller - summary: Save new Reports - operationId: saveReports - parameters: - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ReportDTO' - required: true - responses: - '200': - description: Reports saved with success - content: - '*/*': - schema: - $ref: '#/components/schemas/ResponseMessage' - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/sharing/getAllRatingsScoresForEachBpn: - get: - operationId: getAllRatingsScoresForEachBpn - parameters: - - name: datasource[] - in: query - required: true - schema: - type: array - items: - $ref: '#/components/schemas/DataSourceDTO' - maxItems: 20 - default: [] - - name: bpns[] - in: query - required: true - schema: - type: array - items: - $ref: '#/components/schemas/BusinessPartnerDTO' - maxItems: 20 - default: [] - - name: companyUser - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - /api/sharing/getAllRatingsForCompany: - get: - tags: - - Sharing Controller - summary: Retrieves ratings based on inserted year and Company User - operationId: getAllRatingsForCompany - parameters: - - name: year - in: query - required: false - schema: - type: integer - format: int32 - default: 0 - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: Ratings of inserted custom year retrieved with success - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/DataSourceDTO' - maxItems: 20 - default: [] - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/ratingsByYear: - get: - tags: - - Dashboard Controller - summary: Retrieves ratings based on inserted year - operationId: ratingsByYear - parameters: - - name: year - in: query - required: false - schema: - type: integer - format: int32 - default: 0 - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: Ratings of inserted custom year retrieved with success - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/DataSourceDTO' - maxItems: 20 - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/getWorldMap: - get: - tags: - - Dashboard Controller - summary: Retrieves a score based on selected ratings, year and current user - operationId: getDashBoardWorldMap - parameters: - - name: ratings[] - in: query - required: true - schema: - type: array - items: - $ref: '#/components/schemas/RatingDTO' - maxItems: 20 - default: [] - - name: companyUser - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - - name: year - in: query - required: false - schema: - type: integer - format: int32 - default: 0 - responses: - '200': - description: World map information requested with success - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/DashBoardWorldMapDTO' - maxItems: 20 - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/getUserRanges: - get: - tags: - - Dashboard Controller - summary: Retrieves current user ranges - operationId: userRanges - parameters: - - name: companyUser - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: User Ranges requested with success - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/RangeDTO' - maxItems: 20 - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/getUserFromCompany: - get: - tags: - - Dashboard Controller - summary: Retrieves Company User of a Company - operationId: getUserFromCompany - parameters: - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: Users get with success - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/CompanyUserDTO' - maxItems: 20 - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/getTemplate: - get: - tags: - - Dashboard Controller - summary: Retrieves an CSV template - operationId: getTemplate - parameters: - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: CSV file retrieved with success - content: - '*/*': - schema: - type: array - items: - type: string - format: byte - maxItems: 20 - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/getTableInfo: - get: - tags: - - Dashboard Controller - summary: Retrieves Business partners based on selected ratings, year and current user - operationId: getAllDashBoardTable - parameters: - - name: ratings[] - in: query - required: true - schema: - type: array - items: - $ref: '#/components/schemas/RatingDTO' - default: [] - maxItems: 20 - - name: year - in: query - required: false - schema: - type: integer - format: int32 - default: 0 - - name: companyUser - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: 'Business partners request with success based on selected variables ' - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/DashBoardTableDTO' - maxItems: 20 - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/getReportsValueByReport: - get: - tags: - - Dashboard Controller - summary: Retrieves all Reports that a user can get - operationId: getReportsValueByReport - parameters: - - name: reportDTO - in: query - required: true - schema: - $ref: '#/components/schemas/ReportDTO' - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: Report values requested with success - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/ReportValuesDTO' - maxItems: 20 - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/getReportsByCompanyUser: - get: - tags: - - Dashboard Controller - summary: Retrieves all Reports that a user can get - operationId: getReportsByCompanyUser - parameters: - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: Reports requested with success - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/ReportDTO' - maxItems: 20 - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/getCountryFilterByISO2: - get: - tags: - - Dashboard Controller - summary: Retrieves all countries in the database filter by ISO CODE 2 - operationId: getCountrys - parameters: - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: Countries requested with success - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/CountryDTO' - maxItems: 20 - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/getCompanyBpns: - get: - tags: - - Dashboard Controller - summary: Retrieves all Business Partners of a Company - operationId: getCompanyBpns - parameters: - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: Bpn requested with success - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/BusinessPartnerDTO' - maxItems: 20 - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/getBpnCountrys: - get: - tags: - - Dashboard Controller - summary: Retrieves all countries in the database OF THE Bpns - operationId: getBpnCountrys - parameters: - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: Countries requested with success - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/CountryDTO' - maxItems: 20 - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/getAllUserBPDMGates: - get: - tags: - - Dashboard Controller - summary: Retrieves all Gate values that a user can get - operationId: getAllUserBPDMGates - parameters: - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: Gate values requested with success - content: - '*/*': - schema: - type: array - items: - $ref: '#/components/schemas/CompanyGatesDTO' - maxItems: 20 - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/allYears: - get: - tags: - - Dashboard Controller - summary: Retrieves all years saved on the database - operationId: getYears - parameters: - - name: companyUser - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: All years requested with success - content: - '*/*': - schema: - type: array - items: - type: integer - format: int32 - maxItems: 20 - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/deleteReport/{id}: - delete: - tags: - - Dashboard Controller - summary: Deletes Report - operationId: deleteReport - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int64 - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: Deleted reported with success - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] - /api/dashboard/deleteRating/{id}: - delete: - tags: - - Dashboard Controller - summary: Deletes Rating - operationId: deleteRating - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int64 - - name: companyUserDTO - in: query - required: true - schema: - $ref: '#/components/schemas/CompanyUserDTO' - responses: - '200': - description: Deleted rating with success - '401': - description: Authentication Required - security: - - bearerAuth: [] - - open_id_scheme: [] -components: - schemas: - ReportDTO: - required: - - reportName - type: object - properties: - id: - type: integer - format: int64 - reportName: - type: string - example: Fake Report - companyUserName: - type: string - example: John - company: - type: string - example: Test Company - email: - type: string - example: John@email.com - type: - type: string - example: Company - enum: - - Global - - Custom - - Company - reportValues: - type: array - items: - $ref: '#/components/schemas/ReportValuesDTO' - maxItems: 20 - ReportValuesDTO: - type: object - properties: - name: - type: string - example: Range - objectValue: - type: object - CompanyUserDTO: - required: - - companyName - - email - - name - type: object - properties: - name: - type: string - example: John - email: - type: string - example: John@email.com - companyName: - type: string - example: TestCompany - ResponseMessage: - type: object - properties: - message: - type: string - RangeDTO: - required: - - range - - value - type: object - properties: - range: - type: string - example: Max - enum: - - Max - - Between - - Min - value: - type: integer - format: int32 - example: 80 - description: - type: string - example: Max value - companyUser: - $ref: '#/components/schemas/CompanyUserDTO' - DataSourceDTO: - required: - - dataSourceName - - type - - yearPublished - type: object - properties: - id: - type: integer - format: int64 - dataSourceName: - type: string - example: Fake Rating - type: - type: string - example: Custom - enum: - - Global - - Custom - - Company - yearPublished: - type: integer - format: int32 - example: 2021 - fileName: - type: string - example: Test Company Rating - BusinessPartnerDTO: - type: object - properties: - id: - type: integer - format: int64 - bpn: - type: string - example: BPN-NUMBER - legalName: - type: string - example: Divape Company - street: - type: string - example: 1st - houseNumber: - type: string - example: Sutteridge - zipCode: - type: string - example: '633104' - city: - type: string - example: Covilha - country: - type: string - example: Portugal - longitude: - type: string - example: '107.6185727' - latitude: - type: string - example: '-6.6889038' - supplier: - type: boolean - example: false - customer: - type: boolean - example: true - ShareDTO: - type: object - properties: - id: - type: integer - format: int64 - bpn: - type: string - example: BPN-NUMBER - country: - type: string - example: Portugal - iso2: - type: string - example: PT - rating: - type: array - items: - $ref: '#/components/schemas/ShareRatingDTO' - maxItems: 20 - default: [] - ShareRatingDTO: - type: object - properties: - dataSourceName: - type: string - example: Fake Rating - score: - type: number - format: float - example: 100 - RatingDTO: - type: object - properties: - dataSourceName: - type: string - example: Fake Rating - weight: - type: number - format: float - example: 100 - CountryDTO: - required: - - continent - - country - - iso2 - - iso3 - - latitude - - longitude - - totalBpn - type: object - properties: - id: - type: integer - format: int64 - country: - type: string - example: Germany - iso3: - maxLength: 2 - minLength: 0 - type: string - example: DEU - iso2: - maxLength: 3 - minLength: 0 - type: string - example: DE - continent: - type: string - example: Europe - latitude: - type: string - example: '-2.9814344' - longitude: - type: string - example: '23.8222636' - totalBpn: - type: integer - format: int64 - example: 11 - DashBoardWorldMapDTO: - type: object - properties: - country: - $ref: '#/components/schemas/CountryDTO' - score: - type: number - format: float - example: 90 - DashBoardTableDTO: - type: object - properties: - id: - type: integer - format: int64 - bpn: - type: string - example: BPN-NUMBER - legalName: - type: string - example: Divape Company - street: - type: string - example: 1st - houseNumber: - type: string - example: Sutteridge - zipCode: - type: string - example: '633104' - city: - type: string - example: Covilha - country: - type: string - example: Portugal - score: - type: number - format: float - example: 90 - rating: - type: string - example: Fake Rating - longitude: - type: string - example: '107.6185727' - latitude: - type: string - example: '-6.6889038' - supplier: - type: boolean - example: false - customer: - type: boolean - example: true - CompanyGatesDTO: - required: - - companyGateValue - - gateName - type: object - properties: - id: - type: integer - format: int64 - gateName: - type: string - companyGateValue: - type: string - securitySchemes: - open_id_scheme: - type: oauth2 - flows: - authorizationCode: - authorizationUrl: https://centralidp.dev.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/auth - tokenUrl: https://centralidp.dev.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/token - scopes: - read: Grants read access - write: Grants write access - admin: Grants access to admin operations - bearerAuth: - type: http - scheme: bearer - bearerFormat: JWT -