MCPcopy
hub / github.com/strapi/strapi / DocumentInfoAssembler

Class DocumentInfoAssembler

packages/core/openapi/src/assemblers/document/info.ts:16–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14const debug = createDebugger('assembler:info');
15
16export class DocumentInfoAssembler implements Assembler.Document {
17 assemble(context: DocumentContext): void {
18 const { name, version } = context.strapi.config.get<StrapiInfoConfig>('info');
19
20 debug(`assembling document's info for %O...`, { name, version });
21
22 const info: OpenAPIV3_1.InfoObject = {
23 title: this._title(name),
24 description: this._description(name, version),
25 version,
26 };
27
28 debug(`document's info assembled: %O`, info);
29
30 context.output.data.info = info;
31 }
32
33 private _title(name: string) {
34 return `${name}`;
35 }
36
37 private _description(name: string, version: string) {
38 return `API documentation for ${name} v${version}`;
39 }
40}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…