FAQ

  • GitHub GitHub Repo stars
  • Discord Discord Server
  • ✨ New! Try the OpenAPI Doctor ✨ The OpenAPI Doctor
    Recommended

    path-not-include-query


    Formats: Severity:

    JSON Path: $.paths

    This rule checks to ensure a paths definition does not contain a Query string.

    The mistake is actually quite common with authors new to the OpenAPI standard. It happens all the time.

    Why did this violation appear?

    One or more paths definitions contains a query string.

    Bad example

     paths:
      /deserts/icecream?sprinkles=true:
        get:
          parameters:
          ...
    

    Good example

     paths:
      /deserts/icecream:
        get:
          parameters:
          - in: query
            name: "sprinkles"
            ...
    

    How do I fix this violation?

    Ensure there are no query parameters ‘?key=value’ defined as a part of any paths definition.

    Spectral Equivalent

    The rule is equivalent to path-not-include-query