3 ms·
Congratulations on launching, you have some interesting ideas in there. Using a LLM to generate missing operation ids isn't something I've tried, instead I sim
by mnahkies 3y ago
Congratulations on launching, you have some interesting ideas in there.
Using a LLM to generate missing operation ids isn't something I've tried, instead I simply combine http method plus path segments which at least guarantees uniqueness [1]. I do a similar thing for extracting and naming inline schemas based on the operation and media types [2].
How do you prevent naming collisions? And do you find the resulting names to be significantly better than a deterministic approached like I described?
I'll definitely checkout the curated specifications - always useful to get more high quality (and hopefully varied) specifications to test my code generator with, and the lint rules is a great idea - I've had to explain what patterns lend themselves well to code generation many times.
I'm on mobile so may have missed it, but looking at one of your typescript examples I couldn't see any runtime response body validation, is this something you're thinking about?
- [1] https://github.com/mnahkies/openapi-code-generator/blob/main/packages%2Fopenapi-code-generator%2Fsrc%2Fcore%2Finput.ts#L248-L258 https://github.com/mnahkies/openapi-code-generator/blob/main...
- [2] https://github.com/mnahkies/openapi-code-generator/pull/123 https://github.com/mnahkies/openapi-code-generator/pull/123