SpaceTradersAPI / api-docs

The API documentation for the SpaceTraders API
143 stars 35 forks source link

ShipRefineResponse - tradeSymbol vs Symbol Mismatch #54

Closed cscattaglia917 closed 1 year ago

cscattaglia917 commented 1 year ago

Similar to the other issue I just opened - seems there is another slight mismatch between the docs and what the API is returning. Per the OpenAPI spec, for a refine request, produced and consumed are supposed to return "tradeSymbol" along with respective units.

However, it seems that the API is returning "symbol" for these produced and consumed values - leading to a situation where the model de-serialization fails (model expecting tradeSymbol, but data contains symbol) so my return values look like this:

produced=[ShipRefine201ResponseDataProducedInner(trade_symbol=None, units=10)] consumed=[ShipRefine201ResponseDataProducedInner(trade_symbol=None, units=30)]

space-admiral commented 1 year ago

Thanks for reporting this! Looks like the fields aren't required either but should be marked as so - the fix will be going out in the next release.