An example YAML representation of a Product

Products can be represented by using a YAML file in a similar fashion to how APIs can be represented by using OpenAPI (Swagger 2.0).

The following code describes a complete Product, with sample values.

product: 1.0.0

info:
  name: example_product
  title: Example Product
  version: 1.0.0
  description: This is an example Product.
  contact: 
    name: Eva Smith
    url: 'http://example.com/contact'
    email: esmith@example.com
  license:
    name: Example License
    url: 'http://example.com/license'
  termsOfService: This service is an example only

visibility:
   view:
      enabled: true
      type: public
   subscribe:
      enabled: true
      type: authenticated

apis:
   - $ref: "file:///example_api.yaml"

plans:
  Example-Plan:
    description: This is an example Plan.
    approval: true
    rate-limits:
      per-second:
        value: 40/5second
        hard-limit: true
      per-minute:
        value: 500/1minute
        hard-limit: false
    burst-limits:
      burst-limit-1:
        value: 10000/1day
    apis:
      - $ref: "file:///example_api.yaml"
        operations:
        - path: '/example_operation_1'
          verb: 'GET'
          rate-limits:
            unlimited:
              value: unlimited

        - path: '/example_operation_2'
           verb: 'GET'