openBackhaul / MicroWaveDeviceGatekeeper

Gateway for PUTting to the devices
Apache License 2.0
1 stars 1 forks source link

Request to update pattern for property "file-profile-1-0:file-name:" in requestBody for operationId "putFileProfileFileName" #11

Closed sunil-kumar-meena closed 11 months ago

sunil-kumar-meena commented 11 months ago

Problem Description: The pattern for property "file-profile-1-0:file-name:" in requestBody for operationId "putFileProfileFileName" is ^([A-Za-z0-9-_,\s]{3,}).([A-Za-z]{3})$ as mentioned below

fileprofileconfiguration_filename_body:
      required:
      - file-profile-1-0:file-name
      type: object
      properties:
        file-profile-1-0:file-name:
          pattern: "^([A-Za-z0-9-_,\\s]{3,})\\.([A-Za-z]{3})$"
          type: string
          example: application-data.json

which is considering file extension up to three characters and not more than that, for example if we pass file name "encrypted-odl-key.json" in requestBody it will return 400 as it's not matching "json"

Solution: We can update the pattern with below regular expression ^([A-Za-z0-9-_,\s]{3,}).([A-Za-z]{3,})$

openBackhaul commented 11 months ago

Changed as proposed.

sunil-kumar-meena commented 11 months ago

Changed as proposed.

Thank you!