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

examples is a object not an array #33

Open
wants to merge 20 commits into
base: master
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
54 changes: 54 additions & 0 deletions dist/DefinitionGenerator.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { IDefinition, IDefinitionConfig, IServerlessFunctionConfig } from './types';
export declare class DefinitionGenerator {
version: string;
definition: IDefinition;
config: IDefinitionConfig;
/**
* Constructor
* @param serviceDescriptor IServiceDescription
*/
constructor(config: IDefinitionConfig);
parse(): this;
validate(): {
valid: boolean;
context: string[];
warnings: any[];
error?: any[];
};
/**
* Add Paths to OpenAPI Configuration from Serverless function documentation
* @param config Add
*/
readFunctions(config: IServerlessFunctionConfig[]): void;
/**
* Cleans schema objects to make them OpenAPI compatible
* @param schema JSON Schema Object
*/
private cleanSchema;
/**
* Generate Operation objects from the Serverless Config.
*
* @link https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#operationObject
* @param funcName
* @param documentationConfig
*/
private getOperationFromConfig;
/**
* Derives Path, Query and Request header parameters from Serverless documentation
* @param documentationConfig
*/
private getParametersFromConfig;
/**
* Derives request body schemas from event documentation configuration
* @param documentationConfig
*/
private getRequestBodiesFromConfig;
private attachExamples;
/**
* Gets response bodies from documentation config
* @param documentationConfig
*/
private getResponsesFromConfig;
private getResponseContent;
private getHttpEvents;
}
309 changes: 309 additions & 0 deletions dist/DefinitionGenerator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading