openBackhaul / ApplicationPattern

Pattern for REST servers
Apache License 2.0
6 stars 16 forks source link

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

Closed ManasaBM1 closed 2 weeks ago

ManasaBM1 commented 5 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 2 weeks ago

Corrected as proposed.