p-meier / hapi-api-version

An API versioning plugin for hapi.
Apache License 2.0
74 stars 26 forks source link

Admit more characters on the `Accept` header #22

Closed j-a-m-l closed 5 years ago

j-a-m-l commented 5 years ago

This PR allows using more characters on the Accept header . Accepting those characters, means that now faceted names are available.

It follows the specification of https://tools.ietf.org/html/rfc6838#section-4.2.

Resolves https://github.com/p-meier/hapi-api-version/issues/21.

timcosta commented 5 years ago

Hey Juan, this is awesome, thank you. Can you add a test for extra periods within the accept header? Maybe something like vnd.my.Great-app!.v10 which hits more of the regular expression cases? I especially want to make sure we are testing the extra allowed periods as they are used as separators as well. On Thu, Sep 27, 2018 at 14:53 Juan notifications@github.com wrote:

This PR allows using more characters on the Accept header . Accepting those characters, means that now faceted names are available.

It follows the specification of https://tools.ietf.org/html/rfc6838#section-4.2.

Resolves #21 https://github.com/p-meier/hapi-api-version/issues/21.

You can view, comment on, or merge this pull request online at:

https://github.com/p-meier/hapi-api-version/pull/22 Commit Summary

  • Admit non-alphanumeric vendorName on the Accept header
  • Test that Accept headers with special characters use the rigth API version

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/p-meier/hapi-api-version/pull/22, or mute the thread https://github.com/notifications/unsubscribe-auth/ADvC1bXR81QmefCucUyUwQOaSvCYkIZ-ks5ufRCwgaJpZM4W9KdJ .

j-a-m-l commented 5 years ago

@timcosta is this test OK or do you prefer that I change it?

j-a-m-l commented 5 years ago

Ey @timcosta!

Is there anything more that you think it's necessary?

timcosta commented 5 years ago

Published v2.1.0