-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: CodeGeneratorのentryPointに直接OpenApi.Documentを指定可能にする #66
Conversation
constructor(private readonly entryPoint: string, private option?: Option) { | ||
this.rootSchema = Api.FileSystem.loadJsonOrYaml(entryPoint); | ||
this.resolvedReferenceDocument = Api.ResolveReference.resolve(entryPoint, entryPoint, JSON.parse(JSON.stringify(this.rootSchema))); | ||
constructor(private readonly entryPointOrDocument: string | Types.OpenApi.Document, private option?: Option) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Himenon TOOD update interface
c660039
to
3f9de3a
Compare
apiClientGeneratorTemplate, | ||
]); | ||
|
||
expect(code).toMatchSnapshot(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
既存の手続きで生成したコードと比較するだけで良さそうです。
8f77c93
to
e5755e9
Compare
apiClientGeneratorTemplate, | ||
]); | ||
|
||
expect(code1).toBe(code2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
Summary
Nest.jsなどのspec json生成ツールと連携を簡単にするために、ファイル出力をせずにjsonフォーマットを直接受け入れられるようにしました。
server reload時の自動クライアント生成などを行うユースケースに有用です。
Test Plan