solo-io / gloo-portal-issues

Public tracker for issues related to Gloo Portal
https://docs.solo.io/gloo-portal/latest/
1 stars 3 forks source link

Select APIDoc operations in APIProducts based on OpenAPI tags #55

Open marcogschmidt opened 3 years ago

marcogschmidt commented 3 years ago

Problem summary

When creating an APIProduct version that included operations from an OpenAPI APIDoc, users currently have two options. Either they enumerate the subset of operations they want to include, e.g.

apiVersion: devportal.solo.io/v1alpha1
kind: APIProduct
metadata:
  name: foo
  namespace: default
spec:
  versions:
  - name: v1
    apis:
    - apiDoc:
        name: foo-spec
        namespace: default
      openApi:
        operations:
        - id: operation1
        - id: operation2

Or they could use a "catch-all" selector (omit the operation list), to include all operations defined in the APIDoc:

apiVersion: devportal.solo.io/v1alpha1
kind: APIProduct
metadata:
  name: foo
  namespace: default
spec:
  versions:
  - name: v1
    apis:
    - apiDoc:
        name: foo-spec
        namespace: default

Users have asked to additionally be able to include operations based on OpenAPI tags.

Proposed solution

The new configuration could look like this:

apiVersion: devportal.solo.io/v1alpha1
kind: APIProduct
metadata:
  name: foo
  namespace: default
spec:
  versions:
  - name: v1
    apis:
    - apiDoc:
        name: foo-spec
        namespace: default
      openApi:
        operations:
        - tag: public