14.1.1.4.2.1. General schema issues / naming conventions (001)

  • C0001: Identifiers start with a letter, and contain only lowercase, numbers, and _. Applies to:
    • Type names
    • Resource names
    • Link names
    • Relation names
    • Values of an enum for a string field
  • C0002: The name of a type should not start or end with type
  • C0003: The name of a resource should not start or end with resource
  • C0004: The name of a link should not start or end with link
  • C0005: A resource, type, link, or relation name must be at least 2 characters long (eg, pick a better name)
  • C0006: The service definition must have a valid description field, starting with a capital letter
  • C0007: The indentation should be 4 spaces

  • W0001: The provider field must be set to riverbed
  • W0002: The id field must be http://support.riverbed.com/apis/{name}/{version}
  • W0003: The $schema field must be http://support.riverbed.com/apis/service_def/{version}
  • W0004: the schema must have a title
  • W0005: object schema is missing additionalProperties, assumed to be True
  • W0006: A required property should not have a default value

  • E0001: Invalid $ref; the target cannot be found
  • E0002: Invalid required property when additional property is False
  • E0003: The relation is invalid. The specified resource cannot be found

14.1.1.4.2.3. Types (200)

  • C0200: A type must have a valid description field

Thought about rule on types needing to be used by multiple resources, but that doesnt always work (to cut down on extra type definitions)

  • linking between schemas (common types)
  • sometimes its useful when the indentation gets too long

Same goes for an unused type, although we may want that one if we have a way to suppress

14.1.1.4.2.4. Resources (300)

  • C0300: A resource must have a valid description field
  • C0301: A resource should be an object
  • C0302: Collection resource object should have an ‘items’ property
  • C0303: Self link should be the first in links