-
Notifications
You must be signed in to change notification settings - Fork 61
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
[BUG] ConfigSyncApiSwaggerGenOptions overrides Umbraco behavior #629
Comments
Thanks for this, i didn't spot that. but i am concerned the umbraco solution isn't sustainable for multiple packages 🤔 If i implement a Custom It might just be that i only need to impliment something on my site i get the swagger from, because once the client is built it doesn't matter ? I will raise this with someone in the core see what they say. |
You are totally right about that, that's why I made an edit, suggesting IOperationIdHandler. Basically, you can create a handler like this:
Info taken from umbraco/Umbraco-CMS#16062 |
thanks, I've added that - I think there is a RC2 of Umbraco on the horizon, so will merge a few things and hopefully release it all for that. |
* From v13: Fixes (#590) - missing null check * From v13: Fixes #604. don't prepend path with ~ (for no random reason!) * From v13: Fix #224 - Observe root folder value in rootfolder array if set (and root folders array is not set). (#606) * From v13: Throw for duplicates ( Jumoo/uSync.Complete.Issues#225 ) * Add serializers and handlers for webhooks. (#613) * Add serializers and handlers for webhooks. * Webhook Comments * From v13: Add serializers and handlers for webhooks. (#613) * From v13: Fix #609 Default language importing. (#614) * From v13: Use folders provided in options over config (#610) * From v13: fix #605 - check delete by serializing item one last time. (#616) * From v13: Fix - delete entries show up twice in report and actions. (#617) * From v13: #612 - couple of extra checks so we never try to create an XCData section with a null value. (#618) * Fix for #619. don't report property deletes as changes when they have… (#621) * Fix for #619. don't report property deletes as changes when they have already happened * Add fix for #620 - don't recreate items that are deleted. * v13 - > v14 null checks. * From v13: DataType merging Empty items alway win * update build script * tidy up logging. * consistant JSON options * Add Extra saves for content (not sure we need them! - might be a rc1 issue) * Add Ability to change the editor alias on import * Post RC1 - migration fixes. * chore: project things * fixes #629 have a custom Operations handler just for uSync swagger endpoint.
we did this, closing. |
Describe the bug
https://github.com/KevinJump/uSync/blob/v14/dev/uSync.Backoffice.Management.Api/Configuration/ConfigSyncApiSwaggerGenOptions.cs#L21C9-L21C88
options.CustomOperationIds(e => $"{e.ActionDescriptor.RouteValues["action"]}");
This code overrides the default Umbraco implementation
https://github.com/umbraco/Umbraco-CMS/blob/v14/dev/src/Umbraco.Cms.Api.Common/Configuration/ConfigureUmbracoSwaggerGenOptions.cs#L46
swaggerGenOptions.CustomOperationIds(description => _operationIdSelector.OperationId(description));
To Reproduce
Upon installing the usync nuget, the umbraco behavior is overwritten because of the double CustomOperationIds.
Expected behavior
Implementation of OperationIdSelector, which would have them work both: https://docs.umbraco.com/umbraco-cms/reference/api-versioning-and-openapi#adding-custom-schema-ids
Upon checking, it might be better to use IOperationIdHandler, since otherwise, any custom logic might be skipped.
Additional context
Umbraco + usync 14.0.0-rc1
The text was updated successfully, but these errors were encountered: