Skip to content

Mark required and optional fields in definitions #3

Open
@Richard-Degenne

Description

Objects such as listensForUser do not define any required properties.

I'm currently developing a Ruby wrapper for the API and it's not clear what fields are always present and which one are optional. Adding this information to the documentation would be a great tool to ensure a good symmetry with the API typings.

Example

      listens:
        type: array
        items:
          type: object
          required: # <= Here
            - inserted_at
            - listened_at
            - track_metadata
          properties:
            inserted_at:
              type: integer
            listened_at:
              type: integer
            recording_msid:
              type: string
            track_metadata:
              $ref: '../common/trackMetadata.yaml'
            user_name:
              type: string

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions