-
Notifications
You must be signed in to change notification settings - Fork 35
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
Waypoint/SystemWaypoint schema inconsistency #45
Comments
Same with They could all be collapsed into the Edit: The same situation can be applied for |
@yamin8000 ya I agree, I think originally this was set up to make it simpler to plot a system and all the waypoints without needing a beginner to send multiple requests to piece things together, but I don't think it makes a lot of sense in hindsight. I'm thinking we might remove the As for ScannedShip vs Ship, that one is a bit more interesting. I can share that the intention here is that a "scanned ship" can only show you details of what you might see externally, and so the properties are limited relative to a ship you own. I agree you could accomplish this by leveraging the Ship schema and just making many of the internal properties optional, but that would be a bit cumbersome on clients to now have to do fairly constant property checks on ship properties, when the use cases are quite different. I think I prefer in this case to keep the two models separate. I think our intention is that on any endpoint where the use cases or perspectives are largely different, the preference is to keep the types separate even if they are similar views of the same underlying object. Having said that, it's definitely a tricky area we're still thinking about - if anyone has some suggestions, we would love to consider them. Some of the design goals include:
You can see some of these goals are in conflict, and thats what makes it so tricky. Thanks for reporting this and I hope to get some more thoughts if you have some design suggestions. |
Get System endpoint
https://api.spacetraders.io/v2 /systems/{systemSymbol}
response includes awaypoints
object which is a list ofWaypoint
.However, Get Waypoint endpoint
https://api.spacetraders.io/v2 /systems/{systemSymbol}/waypoints/{waypointSymbol}
returns a more detailed waypoint with more parameters. Why?Why not return a detailed Waypoint in both endpoints?
I mean client could define two classes one named
Waypoint
with more detailed information and another compact calledSystemWaypoint
but they are fundamentally the same entity so it's better to treat them as such.The text was updated successfully, but these errors were encountered: