Skip to content

[no-file-extensions-in-paths] complains about .xml and .json if XXX-json or XXX-xml is in the path #44

@mydeveloperday

Description

@mydeveloperday

Should the "." in

notMatch: ".(json|xml|html|txt)$",

be escaped as \.

image

vs

image

"no-file-extensions-in-paths": {
      message:
        "Paths must not include file extensions such as .json, .xml, .html and .txt.",
      description:
        "Paths must not include file extensions such as `.json`, `.xml`, `.html` and `.txt`. Use the OpenAPI `content` keyword to tell consumers which Media Types are available.",
      given: "$.paths[*]~",
      then: {
        function: pattern,
        functionOptions: {
          notMatch: ".(json|xml|html|txt)$",
        },
      },
      severity: DiagnosticSeverity.Error,
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions