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

feat: Exclude certain endpoints from media type validation #544

Merged
merged 5 commits into from
Nov 6, 2018
Merged

feat: Exclude certain endpoints from media type validation #544

merged 5 commits into from
Nov 6, 2018

Conversation

estahn
Copy link
Contributor

@estahn estahn commented Nov 6, 2018

@estahn
Copy link
Contributor Author

estahn commented Nov 6, 2018

@erayd I'm flexible on the naming of the attribute and method name. I just didn't have better ideas. Let me know your thoughts.

@bighappyface
Copy link
Collaborator

@estahn is blacklist the correct term? Wouldn't a list of allowed endpoints be a whitelist?

src/JsonSchema/Uri/UriRetriever.php Outdated Show resolved Hide resolved
src/JsonSchema/Uri/UriRetriever.php Outdated Show resolved Hide resolved
src/JsonSchema/Uri/UriRetriever.php Outdated Show resolved Hide resolved
src/JsonSchema/Uri/UriRetriever.php Outdated Show resolved Hide resolved
src/JsonSchema/Uri/UriRetriever.php Outdated Show resolved Hide resolved
tests/Uri/UriRetrieverTest.php Outdated Show resolved Hide resolved
tests/Uri/UriRetrieverTest.php Outdated Show resolved Hide resolved
- Change stripos to strpos to match case-insensitive
- Rename $mediaTypeBlacklist to $allowedInvalidContentTypeEndpoints
- Refactor for to foreach
Copy link
Contributor

@erayd erayd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good - still needs a bit of cleaning up on the names, but otherwise OK 👍.

tests/Uri/UriRetrieverTest.php Outdated Show resolved Hide resolved
tests/Uri/UriRetrieverTest.php Outdated Show resolved Hide resolved
tests/Uri/UriRetrieverTest.php Outdated Show resolved Hide resolved
Copy link
Contributor

@erayd erayd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - thank you for contributing this 👍.

@erayd
Copy link
Contributor

erayd commented Nov 6, 2018

@bighappyface Your turn :-).

@estahn estahn changed the title feat: Add blacklisting of endpoints with invalid media types feat: Exclude certain endpoints from media type validation Nov 6, 2018
@bighappyface bighappyface merged commit 17b6e5d into jsonrainbow:master Nov 6, 2018
@estahn estahn deleted the disable-media-type-validation branch November 6, 2018 23:07
@erayd erayd mentioned this pull request Jan 10, 2019
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.

3 participants