Forum Discussion

dhaval1896's avatar
dhaval1896
New Contributor
7 months ago
Solved

path template expressions is not matched with Parameter Object(s)

I am getting this error in Swagger 3.1.0. Worked fine in 3.0 version. path parameter is well defined in path item object using $ref. However, getting linting error 3040101. If the path parameter is r...
  • Tom_S's avatar
    Tom_S
    7 months ago

    In OpenAPI 3.1.0, you can still use pathItems under paths, but there are stricter validation rules regarding path parameters. The main change is that path parameters must be explicitly defined within the parameters section of components and referenced in operations, rather than inside pathItems.

    When you have parameters in the URL, you need to ensure that the path parameters are correctly defined within the pathItem itself or within each operation under the pathItem. The path parameters must be included in the parameters section of the pathItem or the specific operation (e.g., get, post, etc.).