Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

take in test examples into smartapi spec #91

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/parser/endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export default class Endpoint {
association,
response_mapping: responseMapping,
tags: queryOperation.tags,
testExamples: op.testExamples,
};
res.push(updateInfo);
}
Expand Down
7 changes: 7 additions & 0 deletions src/parser/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ interface SmartAPIServerObject {
"x-maturity": any;
}

export interface TestExampleObject {
qInput: string;
oneOutput: string;
}

export interface SmartAPIReferenceObject {
$ref?: string;
}
Expand Down Expand Up @@ -110,6 +115,7 @@ export interface XBTEKGSOperationBioEntityObject {
export interface XBTEKGSOperationObject {
inputs: XBTEKGSOperationBioEntityObject[];
outputs: XBTEKGSOperationBioEntityObject[];
testExamples?: TestExampleObject[];
predicate: string;
qualifiers?: { [qualifierType: string]: string };
source?: string;
Expand Down Expand Up @@ -192,6 +198,7 @@ export interface SmartAPIKGOperationObject {
response_mapping?: any;
id?: string;
tags?: string[];
testExamples?: TestExampleObject[];
}

export interface ParsedAPIMetadataObject {
Expand Down
Loading