UNPKG

704 BTypeScriptView Raw
1import { ApplicationMetadata } from '@loopback/core';
2import { OASEnhancer, OpenApiSpec } from '@loopback/openapi-v3';
3/**
4 * An OpenAPI spec enhancer to populate `info` with application metadata
5 * (package.json).
6 */
7export declare class InfoSpecEnhancer implements OASEnhancer {
8 readonly pkg?: ApplicationMetadata | undefined;
9 name: string;
10 constructor(pkg?: ApplicationMetadata | undefined);
11 modifySpec(spec: OpenApiSpec): OpenApiSpec;
12 /**
13 * Parse package.json
14 * {@link https://docs.npmjs.com/files/package.json#people-fields-author-contributors | author}
15 *
16 * @param author - Author string or object from package.json
17 */
18 private static parseAuthor;
19}