File tree 1 file changed +6
-2
lines changed
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";
3
3
import * as Api from "./api" ;
4
4
import type * as Types from "./types" ;
5
5
6
+ export interface Option {
7
+ allowOperationIds ?: string [ ] ;
8
+ }
9
+
6
10
export class CodeGenerator {
7
11
private rootSchema : Types . OpenApi . Document ;
8
12
private resolvedReferenceDocument : Types . OpenApi . Document ;
9
13
private parser : Api . OpenApiTools . Parser ;
10
- constructor ( private readonly entryPoint : string ) {
14
+ constructor ( private readonly entryPoint : string , option ?: Option ) {
11
15
this . rootSchema = Api . FileSystem . loadJsonOrYaml ( entryPoint ) ;
12
16
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 ) ;
14
18
}
15
19
16
20
private createParser ( allowOperationIds ?: string [ ] ) : Api . OpenApiTools . Parser {
You can’t perform that action at this time.
0 commit comments