Forum Discussion

Haroon90's avatar
Haroon90
New Contributor
3 years ago

Problem in loading Swagger/OpenAPI Definition

Hi, I'm getting error upon importing Swagger/OpenAPI Definition. Error is "attribute components.schemas.Schema name doesn't adhere to regular expression ^[a-zA-Z0-9\.\-_]+$"

 

I tried viewing this documentation in swagger editor (https://editor.swagger.io/)  that explains the error that delete request cannot have a body.  

Howver, found there a button to try new swagger editor (https://editor-next.swagger.io/ ), and that editor is not giving me the error. 

 

Looks like there's un update in editor that is not yet implemented by ReadyAPI latest version (ReadyAPI 3.40.2) 

 

 

  • KarelHusa's avatar
    KarelHusa
    Champion Level 1

    Haroon90,

    which version of OpenAPI do you use?

     

    What is the API definition (or the data type name) which causes the error?

     

    • Haroon90's avatar
      Haroon90
      New Contributor

      Thanks KarelHusa

      I'm using latest ReadyAPI version 3.40.2. 

      Swagger documentation with specification version V3.0 is able to open my documentation. However, specification V2.0 is giving me this error: 

       

      • KarelHusa's avatar
        KarelHusa
        Champion Level 1

        Haroon90,

        and which version of OpenAPI do you use in your API specification?

         

        The API specification shall start with:

        openapi: 3.0.1

        or similar declaration.

         

        In OpenAPI 3.0 the component names may consist only from following characters

        A..Z a..z 0..9 . _ -

        Your name contains many other characters, including space, parentheses, etc.

         

        Best regards,

        Karel