Skip to content

Broken examples #267

@maxlinc

Description

@maxlinc

Several of the examples in this repo are invalid according to:

  • swagger-tools validate
  • The Swagger editor
  • The validator badge service (although I'm not sure it's working)

For example, the uber.yaml example shows these errors in via swagger-tools or the editor:

$ swagger-tools validate examples/v2.0/yaml/uber.yaml

API Errors:

  #/definitions/Activities/properties/history: Missing required property: items
  #/paths/~1products/get/responses/200/schema/items/$ref: Not a valid JSON Reference
  #/paths/~1products/get/responses/default/schema/$ref: Not a valid JSON Reference
  #/paths/~1estimates~1price/get/responses/200/schema/items/$ref: Not a valid JSON Reference
  #/paths/~1estimates~1price/get/responses/default/schema/$ref: Not a valid JSON Reference
  #/paths/~1estimates~1time/get/responses/200/schema/items/$ref: Not a valid JSON Reference
  #/paths/~1estimates~1time/get/responses/default/schema/$ref: Not a valid JSON Reference
  #/paths/~1me/get/responses/200/schema/$ref: Not a valid JSON Reference
  #/paths/~1me/get/responses/default/schema/$ref: Not a valid JSON Reference
  #/paths/~1history/get/responses/200/schema/$ref: Not a valid JSON Reference
  #/paths/~1history/get/responses/default/schema/$ref: Not a valid JSON Reference
  #/definitions/Activities/properties/history/$ref: Not a valid JSON Reference

API Warnings:

  #/definitions/Product: Definition is defined but is not used: #/definitions/Product
  #/definitions/PriceEstimate: Definition is defined but is not used: #/definitions/PriceEstimate
  #/definitions/Profile: Definition is defined but is not used: #/definitions/Profile
  #/definitions/Activity: Definition is defined but is not used: #/definitions/Activity
  #/definitions/Activities: Definition is defined but is not used: #/definitions/Activities
  #/definitions/Error: Definition is defined but is not used: #/definitions/Error

12 errors and 6 warnings

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