Skip to content

Commit 6f0fb0b

Browse files
authored
feat(http): add externalDocs to service, operation, tag definition
see platform-internal issue 15432
1 parent d148aa9 commit 6f0fb0b

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/graph.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Extensions } from "./http-spec";
1+
import { Extensions, IExternalDocs } from "./http-spec";
22

33
export interface IShareableNode {
44
id: string;
@@ -20,6 +20,8 @@ export interface INode extends IShareableNode {
2020
export interface INodeTag extends IShareableNode {
2121
name: string;
2222
description?: string;
23+
/** only applicable to tag _definitions_, not references */
24+
externalDocs?: IExternalDocs;
2325
}
2426

2527
export interface INodeVariable {

src/http-spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export interface IHttpService extends INode, IShareableNode {
3131
backgroundColor?: string;
3232
};
3333
internal?: boolean;
34+
externalDocs?: IExternalDocs;
3435
}
3536

3637
export interface IBundledHttpService extends Omit<IHttpService, 'securitySchemes'> {
@@ -66,6 +67,7 @@ export interface IHttpOperation<Bundle extends boolean = false> extends INode, I
6667
securityDeclarationType?: HttpOperationSecurityDeclarationTypes;
6768
deprecated?: boolean;
6869
internal?: boolean;
70+
externalDocs?: IExternalDocs;
6971
}
7072

7173
export enum HttpOperationSecurityDeclarationTypes {
@@ -334,3 +336,8 @@ export type Reference = {
334336
export interface Extensions {
335337
[key: string]: unknown;
336338
}
339+
340+
export interface IExternalDocs {
341+
description?: string;
342+
url: string;
343+
}

0 commit comments

Comments
 (0)