Skip to content

Add DRF spectacular hook(s) to address common linter warnings #17

Description

@sergei-maertens

Pretty much all of our projects that generate an Open API spec are linted and produce the same warnings:

Image

There are some options:

  • Tweak the spectral ruleset to ignore these warnings
  • Add hooks to the shared library that can easily be added to the DRF spectacular settings

If we use the latter approach, I'd say:

  • We can generate an empty servers object or something that's domain-agnostic if nothing is present
  • We can extract the operation tags and ensure they're collected + added to the global tags

@swrichards @stevenbal @CharString I'm interested in your opinions whether we should provide the hooks here or just tweak the spectral ruleset (which can be done in https://github.com/maykinmedia/open-api-workflows/blob/4383c70a26f3bc5caafd0423bf451ece69bdffe2/actions/oas-lint/action.yml#L62 I suppose)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions