interface ApiSettingsOpenApi {
    components?: SubOptionalOrFalse<ComponentsObject>;
    deprecated?: boolean;
    responses?: OptionalOrFalse<ResponsesObject>;
    server?: ServerObject;
    tags?: openApiTag[];
}

Hierarchy (view full)

Properties

deprecated?: boolean

set this endpoint as deprecated

specify all responses of the operation . Merged by levels

server?: ServerObject

This configuration is under your responsibility. If assigned, ensure that the URL correctly points to your Moleculer-web API. This module will not modify the configuration (will not add the Moleculer-web root path). As such, it can accommodate any reverse proxy configuration.

tags?: openApiTag[]

Allow to define tags of the https://spec.openapis.org/oas/v3.1.0#operation-object|Operation

  • Use a tagObject to define it ( follow by his name to use it )
  • use null to remove all tags added previously (by merge from other levels)
  • use a string to use a tag

tags are unique in all the openApi, and identified by his name . Defining two times the same tag will merge them

Example

// setting tags to all children
{
tags: ['tags1', 'tags2']
}

Example

// remove parents tags, and set tags to children
{
tags: [null, 'tags3', 'tags4']
}

Example

// add tag with description, and use it on children
{
tags: [
{
name: "tags1";
description: "this is the first example tag";
externalDocs: "https://doc.example.com/tags/tags1";
},
'tags1'
]
}