Skip to content
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

[Feature]: Generate relative location header in the ODataEndpoint, when primary key is defined by Entity #374

Open
3 of 5 tasks
s4heid opened this issue Aug 24, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@s4heid
Copy link
Contributor

s4heid commented Aug 24, 2023

Is there an existing issue for this?

  • I have searched the existing issues

The Problem

Split from #326

As previously agreed, the behaviour of Create and Update should be as follows:

  • (1) When response contains the Location (via Response Hint)
    --> use Location as returned by EntityVerticle and set 201 (create) or 200 (update) HTTP status code
  • (2) When Response contains an Entity that defines the primary key completely
    --> generate relative location header in the ODataEndpoint, e.g. EntitySetName(PrimaryKey) (check if helper method is available in Olingo)
  • (3) Respond without an entity (e.g. empty future) or the returned entity does not contain the full primary key.
    --> for backward compatibility, continue as of now by not setting the location header and returning a 204 HTTP status code
  • (4) In future, to be able to use absolute URLs in Location header instead: provide helper method in NeonBee to generate absolute header based on currently RoutingContext and also add new „absoluteURLPrefix“ configuration (e.g. /backend as this is added by AppRouter not NeonBee)

(1) and (3) were already implemented as part of #326. This story is about implementing (2) and (4).

Desired Solution

No response

Alternative Solutions

No response

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant