Comments (2)
Same with ShipNavRouteWaypoint
.
They could all be collapsed into the Waypoint
schema with some removal of required
flags.
Edit: The same situation can be applied for ScannedShip
vs Ship
from api-docs.
@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 waypoints
property entirely from System
and just require the call to /systems/{systemSymbol}/waypoints
.
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:
- don't burden clients with constant optional property checks
- cleanly separate static data that can be cached from dynamic data at the route level to leverage native HTTP caching
- limit the complexity of how many requests you have to send to pull data about a single object, such as a ship, to make the game more approachable when you are first getting started
- try to limit how many near-identical representations exist of the same schema across different endpoints (this is your point above)
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.
from api-docs.
Related Issues (20)
- Inconsistency in OpenAPI spec HOT 1
- 500 when creating survey at X1-XA95-57213D HOT 5
- Better Dynamic Respone Generation HOT 1
- ShipRefineResponse Response Code Mismatch HOT 1
- ShipRefineResponse - tradeSymbol vs Symbol Mismatch HOT 1
- Status API resetDate description HOT 2
- 500 response on survey at X1-DN76-32104E HOT 5
- /game/loans missing from SpaceTraders.json HOT 2
- 500 from negotiateContract HOT 1
- ShipyardTransaction.shipSymbol is confusing HOT 4
- Fails to build with openapi-core
- 500 from /extract HOT 1
- Error when generating client library HOT 2
- Stoplight mock server returns data out of schema
- Why API blocks requests from Iran?
- Waypoint filter incorrect spec HOT 1
- "Getting Started" kinda unclear about how to buy ship HOT 1
- validation error for Faction headquarters
- shipMissingMountsError is defined 2 times
- Crew Quarters module comes twice HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-docs.