Project

Profile

Help

Issue #7258

closed

Not able to generate schema with the CLI

Added by fao89 over 4 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
API Bindings, Documentation
Sprint:
Quarter:

Description

(pulp) [vagrant@pulp3-source-fedora31 ~]$ django-admin spectacular --format openapi --file spec-openapi.yaml
Traceback (most recent call last):
  File "/usr/local/lib/pulp/bin/django-admin", line 8, in <module>
    sys.exit(execute_from_command_line())
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/drf_spectacular/management/commands/spectacular.py", line 50, in handle
    schema = generator.get_schema(request=None, public=True)
  File "/home/vagrant/devel/pulpcore/pulpcore/openapi/__init__.py", line 356, in get_schema
    result = super().get_schema(request, public)
  File "/usr/local/lib/pulp/lib64/python3.7/site-packages/drf_spectacular/generators.py", line 166, in get_schema
    paths=self.parse(request, public),
  File "/home/vagrant/devel/pulpcore/pulpcore/openapi/__init__.py", line 272, in parse
    if "bindings" in request.query_params:
AttributeError: 'NoneType' object has no attribute 'query_params'

Also available in: Atom PDF