SpaceTradersAPI / api-docs

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

Waypoint filter incorrect spec #81

Closed whyando closed 11 months ago

whyando commented 11 months ago

on /systems/{systemSymbol}/waypoints the spec reads as follows:

{
    "description": "Filter waypoints by one or more traits.",
    "in": "query",
    "name": "traits",
    "schema": {
        "oneOf": [
            {
                "$ref": "#/components/schemas/WaypointTrait"
            },
            {
                "type": "array",
                "items": {
                    "$ref": "#/components/schemas/WaypointTrait"
                }
            }
        ]
    }
}

however this means putting a #/components/schemas/WaypointTrait in the query path

but WaypointTrait is a type object! with 3 required properties: symbol, name, description

obviously this is not the intent of the spec

impact:

  1. all generated code will use this endpoint incorrectly
  2. generators for compiled languages (eg rust) may generate code that doesn't compile, making the library unusable
kjackson1998 commented 11 months ago

This was fixed. It needs to be published to stoplight.

https://github.com/SpaceTradersAPI/api-docs/pull/77