marcoceppi / python-spacetraders

A Python SpaceTraders library for interacting with the API
13 stars 2 forks source link

Market.trade_goods not loading properly #4

Closed dasevilla closed 1 year ago

dasevilla commented 1 year ago

The trade_goods field on spacetraders.models.market.Market doesn't load properly. The JSON field is tradeGoods.

Manually patching the file to the following seems to fix it:

trade_goods: Union[Unset, List["MarketTradeGood"]] = Field(alias="tradeGoods")
marcoceppi commented 1 year ago

Thanks for the report. It looks like for Optional parameters the API generator is using this magic UNSET definition which is skipping the code I added for pydantic Fields. I'll patch this up and have a release out later today