Skip to content

feat: Exclude certain endpoints from media type validation - #544

Merged
bighappyface merged 5 commits into
jsonrainbow:masterfrom
estahn:disable-media-type-validation
Nov 6, 2018
Merged

feat: Exclude certain endpoints from media type validation#544
bighappyface merged 5 commits into
jsonrainbow:masterfrom
estahn:disable-media-type-validation

Conversation

@estahn

@estahn estahn commented Nov 6, 2018

Copy link
Copy Markdown
Contributor

@estahn

estahn commented Nov 6, 2018

Copy link
Copy Markdown
Contributor Author

@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.

Comment thread src/JsonSchema/Uri/UriRetriever.php Outdated
@bighappyface

Copy link
Copy Markdown
Collaborator

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

Comment thread src/JsonSchema/Uri/UriRetriever.php Outdated
Comment thread src/JsonSchema/Uri/UriRetriever.php Outdated
Comment thread src/JsonSchema/Uri/UriRetriever.php Outdated
Comment thread src/JsonSchema/Uri/UriRetriever.php Outdated
Comment thread src/JsonSchema/Uri/UriRetriever.php Outdated
Comment thread tests/Uri/UriRetrieverTest.php Outdated
Comment thread tests/Uri/UriRetrieverTest.php Outdated
- Change stripos to strpos to match case-insensitive
- Rename $mediaTypeBlacklist to $allowedInvalidContentTypeEndpoints
- Refactor for to foreach

@erayd erayd left a comment

Copy link
Copy Markdown
Contributor

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 👍.

Comment thread tests/Uri/UriRetrieverTest.php Outdated
Comment thread tests/Uri/UriRetrieverTest.php Outdated
Comment thread tests/Uri/UriRetrieverTest.php Outdated

@erayd erayd left a comment

Copy link
Copy Markdown
Contributor

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

erayd commented Nov 6, 2018

Copy link
Copy Markdown
Contributor

@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