title: Reusing a subset of an enum in OpenAPI (Swagger)
body: <p>I'm trying to achieve an OpenAPI definition where I define a shared, complete list of allowed values as an enum and then use subgroups of the values in different places to show which values are allowed in each case.</p>
  <p>Using the example from <a href="https://swagger.io/docs/specification/data-models/enums/" rel="nofollow noreferrer">the enum spec on Swagger.io</a>, if I have a definition like this:</p>
  <pre class="lang-yaml prettyprint-override"><code>paths:
    /products:
      get:
        parameters:
        - in: query
          name: color
          required: true
          schema:
            $ref: '#/components/schemas/Color'
        responses:
          '200':
            description: OK
  components:
    schemas:
      Color:
        type: string
        enum:
          - black
          - white
          - red
          - green
          - blue
  </code></pre>
  <p>then is it possible to define e.g. two different paths that take a color as a parameter, but one of them only accepts <code>black</code> or <code>white</code> whereas the other accepts all colors?</p>