File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,18 @@ import { EOL } from "os";
33import * as Api from "./api" ;
44import type * as Types from "./types" ;
55
6+ export interface Option {
7+ allowOperationIds ?: string [ ] ;
8+ }
9+
610export class CodeGenerator {
711 private rootSchema : Types . OpenApi . Document ;
812 private resolvedReferenceDocument : Types . OpenApi . Document ;
913 private parser : Api . OpenApiTools . Parser ;
10- constructor ( private readonly entryPoint : string ) {
14+ constructor ( private readonly entryPoint : string , option ?: Option ) {
1115 this . rootSchema = Api . FileSystem . loadJsonOrYaml ( entryPoint ) ;
1216 this . resolvedReferenceDocument = Api . ResolveReference . resolve ( entryPoint , entryPoint , JSON . parse ( JSON . stringify ( this . rootSchema ) ) ) ;
13- this . parser = this . createParser ( ) ;
17+ this . parser = this . createParser ( option ?. allowOperationIds ) ;
1418 }
1519
1620 private createParser ( allowOperationIds ?: string [ ] ) : Api . OpenApiTools . Parser {
You can’t perform that action at this time.
0 commit comments