You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When including a dependency on the schema, the way that dependency is added to the model, is up to the implementation of the resource. The C# implementation as an usage example.
It could be interesting if we could do this without requiring any code on the server side, by indicating the location of the dependency. For this example purposes let's consider the following related resources, a user
This would be instructing the API to retrieve the data from the /users/{id}/teams resource and add the result into the teams property.
This could be extended to resources outside the requested API, which could be very useful for micro APIs environments, although I would say we should limit this to "known" locations. For example
The //teams in the url is a reference to a known location, under the name teams, that internally would be translated to an external API or micro API. These known locations would be set up by the API.
When requesting the dependency resource, the API would use the same headers (except for schema ones). So, if there's any authorization, it is assumed the same would work for the dependency request. However, we could further extend the schema to include additional headers in the dependency request, such as
When including a dependency on the schema, the way that dependency is added to the model, is up to the implementation of the resource. The C# implementation as an usage example.
It could be interesting if we could do this without requiring any code on the server side, by indicating the location of the dependency. For this example purposes let's consider the following related resources, a user
And a user's teams
To combine both into a single requests, here's how the schema could look like
This would be instructing the API to retrieve the data from the
/users/{id}/teams
resource and add the result into theteams
property.This could be extended to resources outside the requested API, which could be very useful for micro APIs environments, although I would say we should limit this to "known" locations. For example
The
//teams
in the url is a reference to a known location, under the nameteams
, that internally would be translated to an external API or micro API. These known locations would be set up by the API.When requesting the dependency resource, the API would use the same headers (except for schema ones). So, if there's any authorization, it is assumed the same would work for the dependency request. However, we could further extend the schema to include additional headers in the dependency request, such as
There are some concerns around what we could add to the resulting model;
The text was updated successfully, but these errors were encountered: