openBackhaul / RegistryOffice

Apache License 2.0
2 stars 8 forks source link

API /v1/regard-updated-approval-status is not backward compatible #542

Closed PrathibaJee closed 7 months ago

PrathibaJee commented 9 months ago

In the RegistryOffice version 2.1.0 , a mandatory attribute response-receiver-operation is added to the API /v1/regard-updated-approval-status. This will make RegistryOffice version 2.1.0 to not work with TypeApprovalRegister version < 2.1.0

Proposal : This attribute response-receiver-operation shall be made optional in this version 2.1.0 and in the next version 3.0.0 this attribute shall be made as mandatory Or next version /v2/regard-updated-approval-status of this API shall be included

openBackhaul commented 8 months ago

Added a oneOf requestBody according to v2.0 and a response 204 that is just to be sent if requestBody is according to v2.0. Both is commented to be deprecated and to be deleted with v3.0.0

PrathibaJee commented 8 months ago

Added a oneOf requestBody according to v2.0 and a response 204 that is just to be sent if requestBody is according to v2.0. Both is commented to be deprecated and to be deleted with v3.0.0

The proposed solution will make the API /v1/regard-updated-approval-status backward compatible. many thanks.

PrathibaJee commented 7 months ago

The proposed solution is fine. But there is a small change required in one of the defined subschema in the OAS. "additionalProperty" false needs to be added to the deprecated subschema to avoid OAS3tool validation in the server side.

                - description: 'requestBody according to v2.0; DEPRECATED; to be deleted with RO v3.0.0'
                  type: object
                  required:
                    - application-name
                    - release-number
                    - approval-status
+                additionalProperties: false
                  properties:
                    application-name:
                      type: string
                      description: 'Name of application with updated approval status'
                    release-number:
                      type: string
                      pattern: '^([0-9]{1,2})\.([0-9]{1,2})\.([0-9]{1,2})$'
                      description: 'Release of application with updated approval status'
                    approval-status:
                      type: string
                      enum:
                        - 'REGISTERED'
                        - 'APPROVED'
                        - 'BARRED'
                        - 'NOT_YET_DEFINED'
                      description: 'Updated approval status'
openBackhaul commented 7 months ago

Changed as proposed.