Skip to content

[Question] How can I change a route requirement #1401

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

Closed
greg0ire opened this issue Oct 9, 2017 · 0 comments
Closed

[Question] How can I change a route requirement #1401

greg0ire opened this issue Oct 9, 2017 · 0 comments

Comments

@greg0ire
Copy link
Contributor

greg0ire commented Oct 9, 2017

I have ids that may contain dots, and right now the path regex for my route is #^/people/(?P<id>[^/\.]++)(?:\.(?P<_format>[^/]++))?$#s. How can I change the requirements so that dots are allowed.

I tried adding a requirements key, to no avail.

        itemOperations:
            get:
                method: 'GET'
                requirements:
                    id: '[^/]++' # allow dots
cr3a7ure added a commit to cr3a7ure/core that referenced this issue Oct 27, 2017
* GraphQL Query support (api-platform#1358)

* Fix missing service when no Varnish URL is defined

* [PropertyFilter] Fix whitelist comparison (api-platform#1379)

* Remove wrong doc

* Swagger subcollection documentation issue (api-platform#1395)

* Make the requirements configurable

Closes api-platform#1401

* Provide a better exception message and type

Getting "Not found" on a route where you are getting an object can get
really confusing.

* Bump branch alias to 2.2.x-dev

2.1.x-dev is already taken by the 2.1 branch, and this should represent
the next minor version anyway.

* Fix tests

* Reuse PriorityTaggedServiceTrait from symfony

* Improve payload support and remove duplicate code in ConstraintViolationListNormalizer (api-platform#1416)

* Filter Annotation implementation

Parent class filters (needs test)
Support for nested properties
Tests
Fix some comments and remove id=>id in compiler pass

* Throw on abstract data providers / filters

* Remove an unused var

* Remove useless badges

* Enable the coverage

* Fix some quality issues

* Add job to test upstream libs deprecations

If api-platform uses upstream libs in a deprecated way, we should be aware
of it.

* Add job to test upstream libs deprecations

If api-platform uses upstream libs in a deprecated way, we should be aware
of it.

* Fix missing cache tag on empty collections

* Allow plain IDs with `allow_plain_identifiers`

* Fix indentation for GraphQL features.

* Add JSON API basic support (api-platform#785, api-platform#1036, api-platform#1175)

* Clean Behat tests

* Fix tags addition with an empty value

* Document swagger-specific description options

… and where to find them should there be newer ones.

* Fix PHPUnit tests

* Fix missing return statement

* Support & compatibility for PHP7.2

* Add feature to update swagger context for properties

* Generator compat improvements (api-platform#1429)

* Add support for resource names without namespace

* [SF 4.0] Make actions explicitly public

* Allow phpdocumentor/reflection-docblock 4

* fix hydra documentation normalizer with subresources

* Create a base collection normalizer

* Fix request auto-runner

* Update the changelog

* Update changelog
hoangnd25 pushed a commit to hoangnd25/core that referenced this issue Feb 23, 2018
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

No branches or pull requests

1 participant