Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP response codes - cannot be like '4XX', must be integer or start with an integer #104

Open
ibiris opened this issue Nov 26, 2020 · 1 comment

Comments

@ibiris
Copy link

ibiris commented Nov 26, 2020

Whilst the openapi spec allows HTTP codes for responses objects to be of type 2XX or 4XX (link) indicating a range of codes, this sphinx contrib seems unable to use those response codes appearing in a spec, with a warning:

(ERROR/3) HTTP status code must be an integer (e.g. 200) or start with an integer (e.g. 200 OK); <#text: '4XX'> is invalid

Not sure if the issue originates in the sphinxcontrib.openapi or in a dependency.

Way to reproduce: use an openapi.yaml spec with something like this in its paths:

paths:
  /myendpoint:
    post:
      requestBody:
      ...
      responses:
        '4XX':
          description: ...
          content:
             ...
@st3v3nmw
Copy link

It seems to originate from the sphinxcontrib-httpdomain dependency, adding http_strict_mode = False to conf.py seems to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants