- 🇩🇪Germany Anybody Porta Westfalica
I think this should use MRs instead to make it easier for maintainers to review and merge.
- First commit to issue fork.
- last update
10 months ago 10 pass - Status changed to Needs review
10 months ago 12:28pm 15 May 2024 40:31 37:04 Running- last update
10 months ago 10 pass 40:31 37:04 Running40:31 37:04 Running40:31 37:04 Running- last update
10 months ago 10 pass 40:31 37:04 Running- Status changed to Needs work
about 1 month ago 10:56pm 20 January 2025 - 🇺🇸United States jeffschuler Boulder, Colorado
I struggled for awhile trying to figure out how to specify that a param for a custom REST resource should be in the query.
I was able to do so using the patch from #15. (#14 worked for my purposes too.)
After applying the patch, I modified my @RestResource annotation to include the info about the query param like this:
/** * Provides a REST resource. * * @RestResource( * id = "my_rest_resource", * label = @Translation("My REST Reource"), * uri_paths = { * "create" = "/api/v1/foo/{path_param_1}/bar/{path_param_2}" * }, * route_parameters = { * "POST" = { * "my_query_param" = { * "name" = "my_query_param", * "in" = "query", * "type" = "string", * "description" = "My custom query param in addition to the path params", * "required" = true, * } * } * } * ) */
Setting status to Needs work for somebody to take @anybody's advice in turning this into a MR.
- 🇺🇸United States jeffschuler Boulder, Colorado
Sorry @immaculatexavier!
I totally missed that you had already made this a MR. :-p - 🇺🇸United States jeffschuler Boulder, Colorado
MR !8 is working as well for my purpose of defining a query-based endpoint param.