Skip to content

Incorrect METHOD being inferred for APIs in Django application #142

Description

@sohitgore

Describe the bug

The openAPI spec generation for a Django app, assigns incorrect METHOD to some endpoints

How to reproduce

Generate the spec for any Django application eg. https://github.com/smahesh29/Django-WebApp

        "/users/login.html": {
            "get": {
                "responses": {}
            },
            "post": {
                "responses": {}
            },
            "x-atom-usages": {
                "call": {
                    "django_web_app/django_web_app/urls.py": [
                        25
                    ]
                }
            }
        },
        "/users/logout.html": {
            "get": {
                "responses": {}
            },
            "post": {
                "responses": {}
            },
            "x-atom-usages": {
                "call": {
                    "django_web_app/django_web_app/urls.py": [
                        28
                    ]
                }
            }
        }

The spec contains endpoints with both GET and POST which looks incorrect

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions