Skip to content

Commit f817138

Browse files
Alan-ChaErikWittern
authored andcommitted
Clean up get requestBodyObject and responseObject functions
Signed-off-by: Alan Cha <[email protected]>
1 parent 2a3f01b commit f817138

File tree

10 files changed

+138
-130
lines changed

10 files changed

+138
-130
lines changed

packages/openapi-to-graphql/lib/oas_3_tools.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
import { Oas2 } from './types/oas2';
55
import { Operation } from './types/operation';
6-
import { Oas3, ServerObject, ParameterObject, SchemaObject, OperationObject, ReferenceObject, LinkObject, SecuritySchemeObject } from './types/oas3';
6+
import { Oas3, ServerObject, ParameterObject, SchemaObject, OperationObject, ResponseObject, RequestBodyObject, ReferenceObject, LinkObject, SecuritySchemeObject } from './types/oas3';
77
import { PreprocessingData, ProcessedSecurityScheme } from './types/preprocessing_data';
88
import { InternalOptions } from './types/options';
99
export declare type SchemaNames = {
@@ -95,9 +95,9 @@ export declare function inferResourceNameFromPath(path: string): string;
9595
* Returns JSON-compatible schema required by the given endpoint - or null if it
9696
* does not exist.
9797
*/
98-
export declare function getRequestSchema(endpoint: OperationObject, oas: Oas3): {
98+
export declare function getRequestBodyObject(endpoint: OperationObject, oas: Oas3): {
9999
payloadContentType: string;
100-
payloadSchema: SchemaObject;
100+
requestBodyObject: RequestBodyObject;
101101
} | null;
102102
/**
103103
* Returns the request schema (if any) for an endpoint at given path and method,
@@ -109,9 +109,9 @@ export declare function getRequestSchemaAndNames(path: string, method: string, o
109109
* Returns JSON-compatible schema produced by the given endpoint - or null if it
110110
* does not exist.
111111
*/
112-
export declare function getResponseSchema(endpoint: OperationObject, statusCode: string, oas: Oas3): {
112+
export declare function getResponseObject(endpoint: OperationObject, statusCode: string, oas: Oas3): {
113113
responseContentType: string;
114-
responseSchema: SchemaObject;
114+
responseObject: ResponseObject;
115115
} | null;
116116
/**
117117
* Returns the response schema for endpoint at given path and method and with

packages/openapi-to-graphql/lib/oas_3_tools.js

Lines changed: 54 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/oas_3_tools.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openapi-to-graphql/lib/preprocessor.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)