Skip to content

Required options should be marked to avoid confusion #33

@trobert2

Description

@trobert2

hello everyone,
I've been implementing a feature using your partner api based on the models found in this repository.

Most of the locations have the coordinates fields in them. Ex:

    {
      "location_id": 1185,
      "type": "area",
      "name": "New York (State)",
      "english_name": "New York (State)",
      "country": "US",
      "coordinates": {
        "lat": 43.2994285,
        "long": -74.2179326
      },
      "parent_id": 173303
    }

I have based my implementation off of this fact.

Then suddenly the code started to fail because of one tour ("tour_id": 109024) that could not be Unmarshalled due to the location object looking like so:

 "locations": [
    {
      "location_id": 173303,
      "type": "area",
      "name": "Hamilton County, New York",
      "english_name": "Hamilton County, New York",
      "country": "US",
      "parent_id": 168990
    }
  ],

AFAIK in openapi schema fields are optional unless marked otherwise. Properties that are required to be returned should thus be marked as such in the component schema to ensure a better experience for the users of the API

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions