Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-35056

JS Clients: Generated type definitions for GroupPrincipalIn mismatch spec

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Unset
    • None

      GroupPrincipalIn should be one of either PrincipalIn or ServiceAccountIn according to the spec. However, the generated code has GroupPrincipalInPrincipalsInner, which mashes them together. The amalgamated input type makes it such that the client must provide "type" and "clientId" even when the input principal isn't a service account.

      The RBAC spec schema for GroupPrincipalIn:

      The generated code:

      export interface GroupPrincipalIn {
          /**
           *
           * @type {Array<GroupPrincipalInPrincipalsInner>}
           * @memberof GroupPrincipalIn
           */
          'principals': Array<GroupPrincipalInPrincipalsInner>;
      }
      /**
       *
       * @export
       * @interface GroupPrincipalInPrincipalsInner
       */
      export interface GroupPrincipalInPrincipalsInner {
          /**
           *
           * @type {string}
           * @memberof GroupPrincipalInPrincipalsInner
           */
          'username': string;
          /**
           *
           * @type {string}
           * @memberof GroupPrincipalInPrincipalsInner
           */
          'type': GroupPrincipalInPrincipalsInnerTypeEnum;
          /**
           *
           * @type {string}
           * @memberof GroupPrincipalInPrincipalsInner
           */
          'clientID': string;
      } 

              Unassigned Unassigned
              btweed@redhat.com Brandon Tweed
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: