-
Notifications
You must be signed in to change notification settings - Fork 199
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
Kiota should sanitize file names and namespace when generating plugins #5019
Comments
@maisarissi do you expect automatic sanitation here or an error to be returned to the user? |
Automatic sanitation. We should generate the plugin with no errors after that. |
@maisarissi Can we please add a few examples? Small letters are also fine btw., or? |
hey @petrhollayms . As I mentioned in the description, it should be sanitized to only contain letters (uppercase and lowercase) and numbers: |
I assume we keep the original casing? My-Super complex() %@#$& Name becomes MySupercomplexName? |
Originally, we lower cased the file name and kept the same for the other components relying on the plugin name. (See example provided in spec at https:/microsoft/kiota/blob/main/specs/cli/plugin-add.md#using-kiota-plugin-add) Authored #5024 to maintain the behaviour. (file name is lowered but other items maintain casing after sanitization) |
Today when generating plugins Kiota uses the plugin name as the namespace property in the plugin manifest and to name the generated plugin and sliced OpenAPI descriptions files.
The blank space in the namespace property is making Copilot to fail on finding functions to call the plugin.
Example:
When using the cmd above, here is what I get:
Also the
budget tracker-apiplugin.json
file has the following info:Expected:
Files names and namespace should be sanitized to be [A-Z][a-z][0-9], no spaces, no special characters.
The text was updated successfully, but these errors were encountered: