refactor/StringExtensions
20 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9beed532a9 |
Update Swashbuckle to v10 (#20925)
* Update Swashbuckle to v10 * Regenerate backoffice api client * Add missing space for consistency * Simplify nullability check * Small improvement Didn't notice that these classes were internal, so tried keeping compatibility, but it wasn't needed. * Fix failing integration test * Apply suggestions from code review Co-authored-by: Andy Butland <abutland73@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Remove unnecessary comma --------- Co-authored-by: Andy Butland <abutland73@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
d9f8faf509 |
Load balancing: Load balance isolated caches to allow the backoffice to be load balanced (#20417)
* V16: Cache Version Mechanism (#19747) * Add RepositoryCacheVersion table * Add repository * Add Cache version lock * Add GetAll method to repository * Add RepositoryCacheVersionService * Remember to add lock in data creator * Work my way out of constructor hell This is why we use DI folks. 🤦 * Add checks to specific cache policies * Fix migration * Add to schema creator * Fix database access * Initialize the cache version on in memory miss * Make cache version service internal * Add tests * Apply suggestions from code review Co-authored-by: Andy Butland <abutland73@gmail.com> * Add missing obsoletions * Prefer full name --------- Co-authored-by: Andy Butland <abutland73@gmail.com> * fixed merge * V16/feature/move last synced id to db (#19884) * Foundation work for moving last synced id * register manager and repo in dependency injection * Fixing to make tests work * Replacing the use of the old LastSyncedFileManager.cs with the new LastSyncedManager.cs * Testing to delete out of sync id and old entries * changing some stuff to please the reviewer. * Inverted saving methods id check and fixed documentation mishaps * Loadbalancing: Add Cache Sync service to allow us to roll forward isolated caches when backoffice is load balanced. (#20398) * Split cache refreshers into internal and external caches * Add obsolete constructor for CacheInstructionsPruningJob * Add xml docs * Move lastID management into CacheInstructionService * Cache last synced ids in memory * Lock when processing instructions * Sync caches when out of sync * Fix constructors for ICacheSyncService * Cache version on request * Register caches as synced when instructions are processed * Rename CacheVersionAccessor to IRepositoryCacheVersionAccessor * Set caches as synced before actually syncing the caches * Set caches as synced before syncing, within scope, this should also lock the cache version from being written to whilst updating caches * Only check version for backoffice requests * Clear request cache when caches are syned * Default to using NOOP cache version service * Don't generate local identity in database server messenger anymore * Fix ambiguous constructor * Add helper method to switch to load balanced isolated caches * Fix LastSyncedManagerTests * Fix RepositoryCacheVersionServiceTests * Fix DefaultCachePolicyTests * Use correct constructor in FullDataSetRepositoryCachePolicy * Minor cleanup * Add XML docs * Add more xml docs * Apply suggestions from code review Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> --------- Co-authored-by: Zeegaan <skrivdetud@gmail.com> Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> * Fix migration plan * fix tests * Fix integration tests * Fix changes from github review * Move premigrations to v17 * Make lock constantws sequential * Fix comment * Make IRepositoryCacheVersionService and ICacheSyncService protected on EntityRepositoryBase --------- Co-authored-by: Andy Butland <abutland73@gmail.com> Co-authored-by: Nicklas Kramer <nik@umbraco.dk> Co-authored-by: NillasKA <kramernicklas@gmail.com> Co-authored-by: Zeegaan <skrivdetud@gmail.com> Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> |
||
|
|
07641981a4 |
Merge branch 'main' into v17/dev
# Conflicts: # src/Umbraco.Cms.Api.Management/Controllers/Content/ContentCollectionControllerBase.cs # src/Umbraco.Core/Services/IMemberService.cs # src/Umbraco.Core/Services/MemberService.cs |
||
|
|
ef1aaf8bce |
Cherry-pick #20142 for V16 (#20147)
* Support querystring and anchor for local links in Delivery API output (#20142) * Support querystring and anchor for local links in Delivery API output * Add default implementation for backwards compat * Add default implementation for backwards compat (also on the interface) * Fix default implementation * Add extra tests proving that querystring/postfix can be handled for local links in both legacy and current format. |
||
|
|
d623476902 |
Use UTC for system dates in Umbraco (#19822)
* Persist and expose Umbraco system dates as UTC (#19705) * Updated persistence DTOs defining default dates to use UTC. * Remove ForceToUtc = false from all persistence DTO attributes (default when not specified is true). * Removed use of SpecifyKind setting dates to local. * Removed unnecessary Utc suffixes on properties. * Persist current date time with UtcNow. * Removed further necessary Utc suffixes and fixed failing unit tests. * Added migration for SQL server to update database date default constraints. * Added comment justifying not providing a migration for SQLite default date constraints. * Ensure UTC for datetimes created from persistence DTOs. * Ensure UTC when creating dates for published content rendering in Razor and outputting in delivery API. * Fixed migration SQL syntax. * Introduced AuditItemFactory for creating entries for the backoffice document history, so we can control the UTC setting on the retrieved persisted dates. * Ensured UTC dates are retrieved for document versions. * Ensured UTC is returned for backoffice display of last edited and published for variant content. * Fixed SQLite syntax for default current datetime. * Apply suggestions from code review Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com> * Further updates from code review. --------- Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com> * Migrate system dates from local server time to UTC (#19798) * Add settings for the migration. * Add migration and implement for SQL server. * Implement for SQLite. * Fixes from testing with SQL Server. * Fixes from testing with SQLite. * Code tidy. * Cleaned up usings. * Removed audit log date from conversion. * Removed webhook log date from conversion. * Updated update date initialization on saving dictionary items. * Updated filter on log queries. * Use timezone ID instead of system name to work cross-culture. --------- Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com> |
||
|
|
b87ae6ce46 | Fix issue with requests to delivery API by path where URL segment contains special characters (#19390) | ||
|
|
ae54b92005 | Output culture variant update dates from the Delivery API (#19180) | ||
|
|
3dd32642e2 |
Updated server-side dependencies to latest versions for Umbraco 16 (#19117)
* Updated dependencies to latest versions. * Fixed breaking changes following dependency updates. * Limited NUnit updates to within the current major. * Fixed failing delivery API contract integration test. |
||
|
|
64f1e17479 |
Segment support for the Delivery API (#19082)
* Segment support for the Delivery API * Do not apply empty strings as variance. --------- Co-authored-by: Niels Lyngsø <nsl@umbraco.dk> |
||
|
|
ecbfc72323 |
Merge branch 'v15/dev' into v16/merge-from-15
# Conflicts: # src/Umbraco.Cms.Api.Management/Controllers/PublishedCache/RebuildPublishedCacheController.cs # src/Umbraco.Cms.Api.Management/Factories/UserPresentationFactory.cs # src/Umbraco.Core/Persistence/Repositories/ITrackedReferencesRepository.cs # src/Umbraco.Core/Services/ContentEditingService.cs # src/Umbraco.Core/Services/DataTypeService.cs # src/Umbraco.Core/Services/IContentEditingService.cs # src/Umbraco.Core/Services/IDataTypeService.cs # src/Umbraco.Core/Services/ITrackedReferencesService.cs # src/Umbraco.Core/Services/RelationService.cs # src/Umbraco.Core/Services/TrackedReferencesService.cs # src/Umbraco.Infrastructure/Examine/Deferred/DeliveryApiContentIndexHandleContentTypeChanges.cs # src/Umbraco.Infrastructure/Examine/DeliveryApiIndexingHandler.cs # src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TrackedReferencesRepository.cs # src/Umbraco.Web.UI.Client/src/external/backend-api/src/sdk.gen.ts # src/Umbraco.Web.UI.Client/src/mocks/data/document-blueprint/document-blueprint.data.ts # src/Umbraco.Web.UI.Client/src/mocks/data/document/document.db.ts # src/Umbraco.Web.UI.Client/src/packages/core/router/modal-registration/modal-route-registration.controller.ts # src/Umbraco.Web.UI.Client/src/packages/core/router/route/route.context.ts # src/Umbraco.Web.UI.Client/src/packages/core/router/route/route.interface.ts # src/Umbraco.Web.UI.Client/src/packages/core/router/route/router-slot.element.ts # src/Umbraco.Web.UI.Client/src/packages/core/router/router-slot/model.ts # src/Umbraco.Web.UI.Client/src/packages/data-type/reference/repository/data-type-reference.server.data.ts # src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/repository/document-publishing.server.data-source.ts # src/Umbraco.Web.UI.Client/src/packages/documents/documents/rollback/entity-action/rollback.action.ts # tests/Umbraco.Tests.AcceptanceTest/package-lock.json # tests/Umbraco.Tests.AcceptanceTest/package.json # tests/Umbraco.Tests.Common/Builders/UserGroupBuilder.cs # tests/Umbraco.Tests.Integration/Umbraco.Core/Services/TemporaryFileServiceTests.cs |
||
|
|
947afdbc1e |
Amend root content routing and ensure trailing slashes as configured (#18958)
* Amend root content routing and ensure trailing slashes as configured * Fix false positives at root + add more tests * Awaited async method and resolved warning around readonly. --------- Co-authored-by: Andy Butland <abutland73@gmail.com> |
||
|
|
825f791d01 |
Remove the non-controversial, straightforward obsoleted constructs for Umbraco 16 (#18661)
* Removed obsoletes from IConfigManipulator. * Removed obsolete models builder extensions. * Removed the obsolete ContentDashboardSettings. * Removed the obsolete InstallMissingDatabase setting on GlobalSettings. * Removed obsolete NuCache settings. * Removed obsolete RuntimeMinificationSettings. * Removed obsolete health check constant. * Removed obsolete icon constant. * Removed obsolete telemetry constant. * Removed obsolete property and constructor on UmbracoBuilder. * Removed obsolete constructor on AuditNotificationsHandler. * Removed obsolete constructor on HTTP header health checks. * Removed obsolete constructor on MediaFileManager. * Removed obsolete GetDefaultFileContent on ViewHelper. * Remove obsoleted methods on embed providers. * Fix tests. * Removed obsolete constructors on BlockEditorDataConverter. * Removed obsolete SeedCacheDuration property on CacheSettings. * Removed obsolete PublishCulture on ContentRepositoryExtensions. * Removed obsolete MonitorLock. * Removed obsolete synchronous HasSavedValues from IDataTypeUsageService and IDataTypeUsageRepository. * Removed obsolete HasSavedPropertyValues from IPropertyTypeUsageService and IPropertyTypeUsageRepository. * Removed obsolete methods in ITrackedReferencesService and ITrackedReferencesRepository. * Removed obsolete DateValueEditor constructors. * Removed obsolete GetAutomaticRelationTypesAliases. * Removed obsolete constructor on TextOnlyValueEditor. * Removed obsolete constructors on RegexValidator and RequiredValidator. * Removed obsolete constructs on SliderValueConverter and TagsValueConverter. * Removed obsolete GetContentType methods from IPublishedCache. * Removed ContentFinderByIdPath. * Removed obsolete constructor on DefaultMediaUrlProvider. * Removed obsolete constructor on Domain. * Removed obsolete constructor on PublishedRequest. * Removed obsolete methods on CheckPermissions. * Removed obsolete GetUserId from IBackOfficeSecurity. * Removed obsolete methods on LegacyPasswordSecurity. * Removed obsolete constructors on AuditService. * Removed obsolete methods on IContentEditingService. * Remove obsolete constructors and methods on ContentService/IContentService. * Removed obsolete constructor in ContentTypeEditingService. * Removed obsolete constructor in MediaTypeEditingService. * Removed obsolete constructor in MemberTypeEditingService. * Removed obsolete constructor in ContentTypeService. * Removed obsolete constructors in ContentTypeServiceBase. * Removed obsolete constructors and methods in ContentVersionService. * Removed obsolete constructor in DataTypeUsageService. * Removed obsolete constructor in DomainService. * Removed obsolete constructor in FileService. * Removes obsolete AttemptMove from IContentService. * Removes obsolete SetPreventCleanup from IContentVersionService. * Removes obsolete GetReferences from IDataTypeService. * Removed obsolete SetConsentLevel from IMetricsConsentService. * Removed obsolete methods from IPackageDataInstallation. * Removed obsolete methods from IPackagingService. * Removed obsolete methods on ITwoFactorLoginService. Removed obsolete ITemporaryMediaService. * Removed obsolete constructor from MediaService, MemberTypeService and MediaTypeService. * More obsolete constructors. * Removed obsoleted overloads on IPropertyValidationService. * Fixed build for tests. * Removed obsolete constructor for PublicAccessService, UserService and RelationService. * Removed GetDefaultMemberType. * Removed obsolete user group functionality from IUserService. * Removed obsolete extension methods on IUserService. * Removed obsolete method from ITelemetryService. * Removed obsolete UdiParserServiceConnectors. * Removed obsolete method on ICookieManager. * Removed obsolete DynamicContext. * Removed obsolete XmlHelper. * Fixed failing integration tests. * Removed obsoletes in Umbraco.Cms.Api.Common * Removed obsoletes in Umbraco.Cms.Api.Delivery * Removed obsoletes in Umbraco.Cms.Api.Management * Removed obsoletes in Umbraco.Examine.Lucene * Removed obsoletes in Umbraco.Infrastructure * Fix failing delivery API contract integration test. * Made integration tests internal. * Removed obsoletes from web projects. * Fix build. * Removed Twitter OEmbed provider * Removed obsolete constructor on PublishedDataType. * Removed obsolete constructors on PublishedCacheBase. * Removed the obsolete PropertyEditorTagsExtensions. * Removed obsoletion properties on configuration response models (#18697) * Removed obsolete methods from server-side models. * Update client-side types and sdk. * Update client-side files. * Removed obsoletion of Utf8ToAsciiConverter.ToAsciiString overload. (#18694) * Removed obsolete method in UserService. (#18710) * Removed obsoleted group alias keys from being publicly available. (#18682) * Removed unneceessary ApiVersion attribute. * Clean-up obsoletions on MemberService (#18703) * Removed obsoleted method on MemberService, added future obsoletion to interface and updated all callers. * Removed obsoletion on member service method that's not obsolete on the interface. |
||
|
|
780184e553 |
Remove UmbracoPath setting (#16037)
* Use require modifier instead of setting null-suppressed default values * Only remove read-only properties when IgnoreReadOnlyProperties is set * Obsolete UmbracoPath property and remove work-around for obsolete setter * Remove UmbracoPath setting and use constant instead * Remove usage of GetBackOfficePath * Add IHostingEnvironment.GetBackOfficePath() extension method * Add Constants.System.UmbracoPathSegment constant * Update Constants.System XML docs * Replace StringBuilder with string interpolation Co-authored-by: Nuklon <Nuklon@users.noreply.github.com> * Fix syntax error * Removed uses of obsoletes. * Further obsolete messages. * Cleaned up usings. * Update src/Umbraco.Infrastructure/Install/FilePermissionHelper.cs Co-authored-by: Ronald Barendse <ronald@barend.se> --------- Co-authored-by: Nuklon <Nuklon@users.noreply.github.com> Co-authored-by: Andy Butland <abutland73@gmail.com> |
||
|
|
f96ac32b2b |
Merge branch 'v14/dev' into v15/dev
# Conflicts: # Directory.Packages.props # src/Umbraco.Cms.Api.Common/DependencyInjection/UmbracoBuilderAuthExtensions.cs # src/Umbraco.Cms.Api.Delivery/DependencyInjection/UmbracoBuilderExtensions.cs # src/Umbraco.Cms.Api.Delivery/Querying/Selectors/AncestorsSelector.cs # src/Umbraco.Cms.Api.Management/OpenApi.json # src/Umbraco.Infrastructure/Examine/ExamineIndexRebuilder.cs # src/Umbraco.Infrastructure/PropertyEditors/MediaPicker3PropertyEditor.cs # src/Umbraco.PublishedCache.NuCache/ContentStore.cs # tests/Directory.Packages.props |
||
|
|
4b9771c0eb |
Merge branch 'v13/dev' into v14/dev
# Conflicts: # Directory.Packages.props # build/azure-pipelines.yml # src/Umbraco.Cms.Api.Common/DependencyInjection/UmbracoBuilderAuthExtensions.cs # src/Umbraco.Cms.Persistence.EFCore/Locking/SqlServerEFCoreDistributedLockingMechanism.cs # src/Umbraco.Core/Configuration/Models/RichTextEditorSettings.cs # src/Umbraco.Core/EmbeddedResources/Lang/da.xml # src/Umbraco.Core/EmbeddedResources/Lang/en.xml # src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml # src/Umbraco.Core/Services/ContentService.cs # src/Umbraco.Web.BackOffice/Authorization/ContentPermissionsQueryStringHandler.cs # src/Umbraco.Web.BackOffice/Authorization/ContentPermissionsResourceHandler.cs # src/Umbraco.Web.BackOffice/Controllers/ContentController.cs # src/Umbraco.Web.BackOffice/Controllers/ExamineManagementController.cs # src/Umbraco.Web.BackOffice/Controllers/MediaController.cs # src/Umbraco.Web.BackOffice/Trees/StaticFilesTreeController.cs # src/Umbraco.Web.UI.Client/package-lock.json # src/Umbraco.Web.UI.Client/package.json # src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbuttongroup.directive.js # src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js # src/Umbraco.Web.UI.Client/src/common/filters/simpleMarkdown.filter.js # src/Umbraco.Web.UI.Client/src/common/filters/simpleMarkdown.filter.js.js # src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js # src/Umbraco.Web.UI.Client/src/less/components/umb-group-builder.less # src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/mediaentryeditor/mediaentryeditor.less # src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/propertysettings/propertysettings.html # src/Umbraco.Web.UI.Client/src/views/common/overlays/ysod/ysod.controller.js # src/Umbraco.Web.UI.Client/src/views/common/overlays/ysod/ysod.html # src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button-group.html # src/Umbraco.Web.UI.Client/src/views/content/overlays/sendtopublish.controller.js # src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.controller.js # src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html # src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.controller.js # src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/prevalue/blocklist.blockconfiguration.overlay.html # src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.component.js # src/Umbraco.Web.UI.Client~HEAD # src/Umbraco.Web.UI.Login/package-lock.json # src/Umbraco.Web.UI.Login/package.json # tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Content/blockGridEditorContent.spec.ts # tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceNotificationTests.cs # tests/Umbraco.Tests.UnitTests/Umbraco.Web.BackOffice/Controllers/ContentControllerTests.cs # tools/Umbraco.JsonSchema/UmbracoCmsSchema.cs # version.json |
||
|
|
7411c2552b | Added integration test to verify the Delivery API contract (#17949) | ||
|
|
1258962429 |
V15: Remove Nucache (#17166)
* Remove nucache reference from Web.Common * Get tests building-ish * Move ReservedFieldNamesService to the right project * Remove IPublishedSnapshotStatus * Added functionality to the INavigationQueryService to get root keys * Fixed issue with navigation * Remove IPublishedSnapshot from UmbracoContext * Begin removing usage of IPublishedSnapshot from PublishedContentExtensions * Fix PublishedContentExtensions.cs * Don't use snapshots in delivery media api * Use IPublishedMediaCache in QueryMediaApiController * Remove more usages of IPublishedSnapshotAccessor * Comment out tests * Remove more usages of PublishedSnapshotAccessor * Remove PublishedSnapshot from property * Fixed test build * Fix errors * Fix some tests * Delete NuCache 🎉 * Implement DatabaseCacheRebuilder * Remove usage of IPublishedSnapshotService * Remove IPublishedSnapshotService * Remove TestPublishedSnapshotAccessor and make tests build * Don't test Snapshot cachelevel It's no longer supported * Fix BlockEditorConverter Element != Element document type * Remember to set cachemanager * Fix RichTextParserTests * Implement TryGetLevel on INavigationQueryService * Fake level and obsolete it in PublishedContent * Remove ChildrenForAllCultures * Hack Path property on PublishedContent * Remove usages of IPublishedSnapshot in tests * More ConvertersTests * Add hybrid cache to integration tests We can actually do this now because we no longer save files on disk * Rename IPublishedSnapshotRebuilder to ICacheRebuilder * Comment out tests * V15: Replacing the usages of Parent (navigation data) from IPublishedContent (#17125) * Fix .Parent references in PublishedContentExtensions * Add missing methods to FriendlyPublishedContentExtensions (ones that you were able to call on the content directly as they now require extra params) * Fix references from the extension methods * Fix dependencies in tests * Replace IPublishedSnapshotAccessor with the content cache in tests * Resolving more .Parent references * Fix unit tests * Obsolete and use extension methods * Remove private method and use extension instead * Moving code around * Fix tests * Fix more references * Cleanup * Fix more usages * Resolve merge conflict * Fix tests * Cleanup * Fix more tests * Fixed unit tests * Cleanup * Replace last usages --------- Co-authored-by: Bjarke Berg <mail@bergmania.dk> * Remove usage of IPublishedSnapshotAccessor from IRequestItemProvider * Post merge fixup * Remo IPublishedSnapshot * Add HasAny to IDocumentUrlService * Fix TextBuilder * Fix modelsbuilder tests * Use explicit types * Implement GetByContentType * Support element types in PublishedContentTypeCache * Run enlistments before publishing notifications * Fix elements cache refreshing * Implement GetByUdi * Implement GetAtRoot * Implement GetByRoute * Reimplement GetRouteById * Fix blocks unit tests * Initialize domain cache on boot * Only return routes with domains on non default lanauges * V15: Replacing the usages of `Children` (navigation data) from `IPublishedContent` (#17159) * Update params in PublishedContentExtensions to the general interfaces for the published cache and navigation service, so that we can use the extension methods on both documents and media * Introduce GetParent() which uses the right services * Fix obsolete message on .Parent * Obsolete .Children * Fix usages of Children for ApiMediaQueryService * Fix usage in internal * Fix usages in views * Fix indentation * Fix issue with delete language * Update nuget pacakges * Clear elements cache when content is deleted instead of trying to update it * Reset publishedModelFactory * Fixed publishing --------- Co-authored-by: Bjarke Berg <mail@bergmania.dk> Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> Co-authored-by: kjac <kja@umbraco.dk> |
||
|
|
4d98937af9 |
Delivery API nested property expansion and output limiting (#15124)
* V2 output expansion + field limiting incl. deprecation of V1 APIs * Performance optimizations for Content and Block based property editors * A little formatting * Support API versioning in Delivery API endpoint matcher policy * Add V2 "expand" and "fields" to Swagger docs * Renamed route for "multiple items by ID" * Review changes * Update src/Umbraco.Cms.Api.Delivery/Controllers/Media/ByIdMediaApiController.cs Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> * Update src/Umbraco.Cms.Api.Delivery/Filters/SwaggerDocumentationFilterBase.cs Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> * Update src/Umbraco.Cms.Api.Delivery/Filters/SwaggerDocumentationFilterBase.cs Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> * Revert "Performance optimizations for Content and Block based property editors" This reverts commit 0d5a57956b36e94ce951f1dad7a7f3f43eb1f60b. * Introduce explicit API cache levels for property expansion * Friendly handling of bad expand/fields parameters --------- Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> |
||
|
|
3b433e6658 |
Expose "expanding" state in API value conversion (#14312)
* Expose "expanding" state in API value conversion * Add unit test * Add non-breaking and obsoletion * Add compat suppressions |
||
|
|
c06e89af64 |
Content Delivery API (#14051)
* Add the core parts of the headless PoC * Add Content API project (WIP - loads of TODOs and dupes that need to be fixed!) * Rename the content API project and namespaces * Fixed bad merge * Rename everything "Headless" to "ContentApi" or "Api" * Refactor Content + Media: Key => Id, Name not nullable * Make Content API property return value types independent of datatype configuration * Clean up refactorings * First stab at an expansion strategy using content picker as example implementation * Use named JSON options for content API serialization * Proper inclusion and registration of the content API * Introduce API media builder * Make MNTP return API content/media depending on configuration (instead of links) and support output expansion * Content API: Get by controllers (#13740) * Adding ContentApiControllerBase * Adding get by id and url controllers * Change route of get all test controller * Rename to ContentApiController * Refactoring * Removing test controller * Content API: Add start-node header value to deal with url collisions (#13746) * Use start-node header value to deal with url collisions * Cleanup * Rename "url" param to "path" * Adding a start node service to get the start-node header value * Trim '/' from both beginning and end * Content API: Support Accept-Language header (#13831) * Move the content API JSON type resolver to an appropriate namespace * Add localization based on Accept-Language header * Content API: Output expansion (#13848) * Implement request based output expansion strategy + expansion output cache at property level * Slighty leaner implementation for default output expansion strategy * Clarify the code a bit * Fix bad merge * Encapsulate content API dependencies in the DI * Support multi-site and multi-culture routing + a little rename/refactor (#13882) * Support multi-site and multi-culture routing + a little rename/refactor * Make the by route controller handle root nodes * Rename Url to Path in API content output * Add a few comments for magic route creation * Rename services from "Default" to "Noop" * Ensure that Umbraco can boot without adding "AddContentApi()" to ConfigureServices * Moved incorrectly placed media builder * Fix API routes (#13915) * Fix multi URL picker value converter trying to access disposed objects in edge cases * Delivery API: Content routing and structure (#13984) * Introduce content route instead of content path, rename and rework start item (previously start node) handling * Strip out start node path in generated route path * Make the start-item header take precedence over the request domain * Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992) * Include umbraco properties (width, height, ...) in the Media Properties collection (#14023) * Move umbraco properties (width, height, ...) to the Properties collection of the API Media model * Don't output the umbracoFile property of media items * Add content type deny list (#14025) * Create a deny list of content types and utilize it for output generation * Add unit tests * Dedicated property cache level for Content API (#14027) * Support redirect tracking (#14033) * Create a deny list of content types and utilize it for output generation * Add unit tests * Handle redirect tracking in the content API * Include start item routing info for redirects * Add cultures and their routes to the API output (#14038) * Create a deny list of content types and utilize it for output generation * Add unit tests * Handle redirect tracking in the content API * Include start item routing info for redirects * Add culture routes to root output (for HREFLANG support) * Rename redirect service method to better match its purpose * Review changes * Delivery API: Query controller (#14041) * Initial commit * Custom ContentAPIFieldDefinitionCollection * Make index IUmbracoContentIndex * Add querying for children by parent id (key) * Add missing interface * Adding querying endpoint * Test code * Compose unpublishedValueSet, so that you get the correct data in the ContentAPI index * Renaming * Fix ancestorKeys index values * Adding IApiQueryExtensionService to be able to query the ContentAPI index in a generic way * Fix IApiQueryService and clean up QueryContentApiController using it * Support querying for path * Fix content API indexing * Fix default sorting * Implement concrete QueryOption implementations * Introduce new ExecuteQuery that uses the Core OptionHandlers * Implement ExecuteQuery * Change ExecuteQuery signature and implementation * Implement demo sorting and fetching * Add query option handlers and collection builder for them * Cleanup * Revert "Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)" This reverts commit 78e1f748e55383baecd123d06457111e18f13365. * Revert "Delivery API: Content routing and structure (#13984)" This reverts commit a0292ae5350362dd6c1c5bc9763deda928c78a75. * Revert "Fix multi URL picker value converter trying to access disposed objects in edge cases" This reverts commit 6b7c37a5bf7871bee93a2b2640bbc6ef591f14db. * Revert "Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992)" This reverts commit 78e1f748e55383baecd123d06457111e18f13365. * Revert "Delivery API: Content routing and structure (#13984)" This reverts commit a0292ae5350362dd6c1c5bc9763deda928c78a75. * Revert "Fix multi URL picker value converter trying to access disposed objects in edge cases" This reverts commit 6b7c37a5bf7871bee93a2b2640bbc6ef591f14db. * Fix multi URL picker value converter trying to access disposed objects in edge cases * Delivery API: Content routing and structure (#13984) * Introduce content route instead of content path, rename and rework start item (previously start node) handling * Strip out start node path in generated route path * Make the start-item header take precedence over the request domain * Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992) * Test commit * Refactored interfaces for the query handlers and for the selectors (that will handle the value of the fetch query option) * Implemented a base class for the query options * Refactored the names of the selectors and made use of the base class * Refactored the ApiQueryService * Refactored the QueryContentApiController.cs * Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992) * Fixing merge gone wrong * Fix multi URL picker value converter trying to access disposed objects in edge cases * Delivery API: Content routing and structure (#13984) * Introduce content route instead of content path, rename and rework start item (previously start node) handling * Strip out start node path in generated route path * Make the start-item header take precedence over the request domain * Conditionally enabling the delivery API + add protection and preview support + refactor all services to be singletons + ensure no-op implementations for all required services (#13992) * Make fetching work with the new setup * Moving files to dedicated folders * Removing ? for array * Rename selector query method * Implement FilterHandler and some filters * Implement SortHandler and sort some sorts * Refactoring * Adding more fields to index due to querying * Appending filtering and sorting queries * Implementing a new ISelectorHandler without Examine types * Re-implementing the collection to have a dedicated one for the selectors * Implementing a new IFilterHandler without Examine types & refactoring the filters implementing it * Adding a new collection dedicated to filters * Renaming the old collection * Implementing a new ISortHandler without Examine types & refactoring the sorts implementing it * Adding a new collection for the sorts & adding all collections to UmbracoBuilder.Collections * Refactoring the service to use the new collections and types * Refactoring the fields in ContentApiFieldDefinitionCollection * Remove nullability in Handlers * Don't return null for selector * Add TODO for having the filters support negation * Changing the SortType to FieldType with our custom types on the SortOption * Fix AncestorsSelector * Fix ApiQueryService * Documentation * Fix Swagger docs * Refactor the QueryContentApiController * Adding handling for the IApiContentResponse in the JsonTypeResolver * Refactor the service to use a safe fallback value in Examine queries * Adding Noop for the IApiQueryService * Cleanup * Remove comment * Fix name field for indexing * Don't inherit QueryOptionBase in filters * Fix casing for API index constant + swap FIXME with TODO * Add TODO for handling missing fetch with start-item header * Rename query handler parameters to not leak source (i.e. query string) --------- Co-authored-by: kjac <kja@umbraco.dk> Co-authored-by: Elitsa <> Co-authored-by: Zeegaan <nge@umbraco.dk> * Delivery API: Adding pagination to query endpoint (#14083) * Adding pagination to query endpoint * Optimize the paging using Examine directly * Fix comment * Remove skip/take code duplication --------- Co-authored-by: kjac <kja@umbraco.dk> * Add missing CompatibilitySuppressions.xml * Make Delivery API packable * Make Api.Common packable * Renamed extension method and namespace so it is discoverable * Untangle ApiVersion configuration into api.common, so delivery api do not require the management api to boot. * configure options in management api * RTE output as JSON for Content API (#14067) * Conditionally serve RTE output as JSON instead of HTML * Fixed merge * Rename to Delivery API (#14119) * Rename ContentApi to DeliveryApi * Rename delivery API index implementation * Update comments from "Content API" to "Delivery API" * Rename project from Content to Delivery * Add dedicated controller base for content delivery API * Rename delivery API content index to include "content" specifically * Fix compat suppressions --------- Co-authored-by: kjac <kja@umbraco.dk> Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> Co-authored-by: Zeegaan <nge@umbraco.dk> |