antihax/goesi

Lost of decimal precision on the Price in market

dedimarco opened this issue · 3 comments

Hi,
in the type GetMarketsRegionIdOrders200Ok (in v1, get_markets_region_id_orders_200_ok.go file), Price are float32 type, and loss some precision in decimal, where price are greater than one million ISK.
Example : 2 938 863.98 ISK becomes 2 938 864.00 ISK
Could you correct some types to use float64 instead ?
Other files may be affected by the price problem.
Thx.

tested with OpenAPI spec version: 0.4.5

Here is the list of files that could be impacted :

  • v1/get_characters_character_id_orders_200_ok.go: Price float32 json:"price,omitempty" /* Cost per unit for this order */
  • v1/get_markets_prices_200_ok.go: AdjustedPrice float32 json:"adjusted_price,omitempty" /* adjusted_price number */
  • v1/get_markets_prices_200_ok.go: AveragePrice float32 json:"average_price,omitempty" /* average_price number */
  • v1/get_markets_region_id_orders_200_ok.go: Price float32 json:"price,omitempty" /* price number */
  • v1/get_markets_structures_structure_id_200_ok.go: Price float32 json:"price,omitempty" /* price number */

Thanks,

This is per CCP spec. There is an existing issue for this at their repo: esi/esi-issues#356