Skip to content

Json api 2#53

Open
deleted-user-1 wants to merge 5 commits intoOpenRA:masterfrom
deleted-user-1:json-api-2
Open

Json api 2#53
deleted-user-1 wants to merge 5 commits intoOpenRA:masterfrom
deleted-user-1:json-api-2

Conversation

@deleted-user-1
Copy link
Copy Markdown

Supersedes #50. It makes more sense to have the format placeholder at the end of the routes to take an optional argument. By this we keep the option to utilize the {type} placeholder for future API routes.

Depends on #52.

You can review and test by commit by commit.

PhpBB's driver->get_data() method does not expose absolute URLs and
we need special handling for every avatar type due to each using a different URL pattern.
We therefore have to hardcode the avatar type name and path fragments and depend on
internals with which we will need to maintain compatibility in case of future upstream changes.
Using our own implementation with less overhead does not introduce further costs in this case.
We are not using the special built-in '_format' parameter because we need to
set the response headers anyway manually for the default 'MiniYAML' format.
See https://symfony.com/doc/2.8/routing.html#routing-format-param for Symfony's
special '_format' parameter.
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.

1 participant