You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to submit several typing issues that affects development experience of custom plugins. Way of plugin creation explained in the docs is not possible with current types definition.
You should always specify name for plugin when calling defineConfig of custom plugin
See file 1 issue.ts on stackblitz
Documentation reference says, that we should not define name, but that is not possible https://heyapi.dev/openapi-ts/custom-plugin#usage
Solution: make name optional in defineConfig parameter or just omit it
I am unnable to define plugin in plugins list when I want to define overall configuration using @hey-api/openapi-tsdefineConfig function. Please see issue 2.ts file. That is related to restriction of property name type to accept only litterals of official plugins
We should investigate ability to provide (string & {}) as one of the name litterals to achieve support of custom name. If it would be possible to do so without braking official plugin types autocompletion, that would be great
I am unnable to use Plugin.Name type to specify custom plugin name. That is the same issue that was described in 2-nd point and may be resolved alongside with it
Please, let me know your thoughts on this and I will create a PR to resolve those issues
If you would like me to address those issues one by one in multiple PRs, also mention it in your response
Description
I'd like to submit several typing issues that affects development experience of custom plugins. Way of plugin creation explained in the docs is not possible with current types definition.
defineConfig
of custom pluginSee file
1 issue.ts
on stackblitzDocumentation reference says, that we should not define name, but that is not possible
https://heyapi.dev/openapi-ts/custom-plugin#usage
Solution: make name optional in
defineConfig
parameter or just omit it@hey-api/openapi-ts
defineConfig
function. Please seeissue 2.ts
file. That is related to restriction of property name type to accept only litterals of official pluginsWe should investigate ability to provide
(string & {})
as one of the name litterals to achieve support of custom name. If it would be possible to do so without braking official plugin types autocompletion, that would be greatPlugin.Name
type to specify custom plugin name. That is the same issue that was described in 2-nd point and may be resolved alongside with itPlease, let me know your thoughts on this and I will create a PR to resolve those issues
If you would like me to address those issues one by one in multiple PRs, also mention it in your response
Reproducible example or configuration
https://stackblitz.com/edit/hey-api-example-wjxebpjs
OpenAPI specification (optional)
No response
System information (optional)
No response
The text was updated successfully, but these errors were encountered: