updateResourceGroup(name) {
    const { Category, Copy } = this.namespace.elements;

    if (name) {
      this.group = this.api.find(el => el.element === 'category' && el.classes.includes('resourceGroup') && el.title.toValue() === name).first;

      if (!this.group) {
        // TODO: Source maps for these groups. The problem is that the location
        // may not always make sense. Do we point to the tag description,
        // the resource, or the transition?
        this.group = new Category();
        this.group.title = name;
        this.group.classes.push('resourceGroup');

        if (this.swagger.tags && _.isArray(this.swagger.tags)) {
          _.forEach(this.swagger.tags, (tag) => {
            if (tag.name === name && tag.description) {
              this.group.content.push(new Copy(tag.description));
            }

            this.handleExternalDocs(this.group, tag.externalDocs);
          });
        }

        this.api.content.push(this.group);
      }
    }
  }
// Update the current group by either selecting or creating it.
Update the current group by either selecting or creating it.
Update the current group by either selecting or creating it .
updateResourceGroup(name) {
    const { Category, Copy } = this.namespace.elements;
    if (name) {
      this.group = this.api.find(el => el.element === 'category' && el.classes.includes('resourceGroup') && el.title.toValue() === name).first;
      if (!this.group) {
        this.group = new Category();
        this.group.title = name;
        this.group.classes.push('resourceGroup');
        if (this.swagger.tags && _.isArray(this.swagger.tags)) {
          _.forEach(this.swagger.tags, (tag) => {
            if (tag.name === name && tag.description) {
              this.group.content.push(new Copy(tag.description));
            }
            this.handleExternalDocs(this.group, tag.externalDocs);
          });
        }
        this.api.content.push(this.group);
      }
    }
  }
updateResourceGroup ( name ) { const { Category , Copy } = this . namespace . elements ; if ( name ) { this . group = this . api . find ( el => el . element === 'category' && el . classes . includes ( 'resourceGroup' ) && el . title . toValue ( ) === name ) . first ; if ( ! this . group ) { this . group = new Category ( ) ; this . group . title = name ; this . group . classes . push ( 'resourceGroup' ) ; if ( this . swagger . tags && _ . isArray ( this . swagger . tags ) ) { _ . forEach ( this . swagger . tags , ( tag ) => { if ( tag . name === name && tag . description ) { this . group . content . push ( new Copy ( tag . description ) ) ; } this . handleExternalDocs ( this . group , tag . externalDocs ) ; } ) ; } this . api . content . push ( this . group ) ; } } }
Update the current group by either selecting or creating it.
Update the current group by either selecting or creating it .
// TODO: Source maps for these groups. The problem is that the location // may not always make sense. Do we point to the tag description, // the resource, or the transition?