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

Define valid HTTP method depending on openapi version #374

Merged
merged 1 commit into from
Feb 1, 2019

Conversation

lafrech
Copy link
Member

@lafrech lafrech commented Feb 1, 2019

See #165 (comment).

Here are two different implementations (see intermediate commit). Tell me which you prefer, or if you prefer a third approach.

Let's not overthink this too much.

Do you think we need to add a test?

@lafrech
Copy link
Member Author

lafrech commented Feb 1, 2019

On second thought, the first approach

VALID_METHODS = {
    2: VALID_METHODS_OPENAPI_V2,
    3: VALID_METHODS_OPENAPI_V3,
}

is more in line with the rest of clean_operation

        ref_paths = {
            'parameter': {
                2: 'parameters',
                3: 'components/parameters',
            },
            'response': {
                2: 'responses',
                3: 'components/responses',
            },
        }

I can force-reset the second commit.

@sloria
Copy link
Member

sloria commented Feb 1, 2019

Yeah, let's go with the first approach. Go ahead and merge after you've done the reset.

@lafrech lafrech force-pushed the valid_method_depending_on_openapi_version branch from a146a09 to e33076e Compare February 1, 2019 22:14
@lafrech lafrech merged commit 4baa95c into dev Feb 1, 2019
@lafrech lafrech deleted the valid_method_depending_on_openapi_version branch February 1, 2019 22:19
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

Successfully merging this pull request may close these issues.

2 participants