mirror of https://github.com/Squidex/squidex.git
Browse Source
# Conflicts: # src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentEnricher.cspull/400/head
32 changed files with 1428 additions and 2650 deletions
@ -0,0 +1,29 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
using NJsonSchema; |
|||
using NSwag; |
|||
using Squidex.Pipeline.OpenApi; |
|||
|
|||
namespace Squidex.Areas.Api.Config.OpenApi |
|||
{ |
|||
public static class ODataExtensions |
|||
{ |
|||
public static void AddOData(this OpenApiOperation operation, string entity, bool supportSearch) |
|||
{ |
|||
if (supportSearch) |
|||
{ |
|||
operation.AddQueryParameter("$search", JsonObjectType.String, "Optional OData full text search."); |
|||
} |
|||
|
|||
operation.AddQueryParameter("$top", JsonObjectType.Number, $"Optional number of {entity} to take."); |
|||
operation.AddQueryParameter("$skip", JsonObjectType.Number, $"Optional number of {entity} to skip."); |
|||
operation.AddQueryParameter("$orderby", JsonObjectType.String, "Optional OData order definition."); |
|||
operation.AddQueryParameter("$filter", JsonObjectType.String, "Optional OData filter definition."); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
// ==========================================================================
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|||
// All rights reserved. Licensed under the MIT license.
|
|||
// ==========================================================================
|
|||
|
|||
using NSwag.Generation.Processors; |
|||
using NSwag.Generation.Processors.Contexts; |
|||
using Squidex.Web; |
|||
|
|||
namespace Squidex.Areas.Api.Config.OpenApi |
|||
{ |
|||
public sealed class VersionProcessor : IDocumentProcessor |
|||
{ |
|||
private readonly ExposedValues exposedValues; |
|||
|
|||
public VersionProcessor(ExposedValues exposedValues) |
|||
{ |
|||
this.exposedValues = exposedValues; |
|||
} |
|||
|
|||
public void Process(DocumentProcessorContext context) |
|||
{ |
|||
if (exposedValues.TryGetValue("version", out var version)) |
|||
{ |
|||
context.Document.Info.Version = version; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,7 +1,6 @@ |
|||
The data of the content to be created or updated. |
|||
|
|||
Please note that each field is an object with one entry per language. |
|||
If the field is not localizable you must use iv (Invariant Language) as a key. |
|||
When you change the field to be localizable the value will become the value for the master language, depending what the master language is at this point of time. |
|||
If the field is not localizable you must use `iv` (Invariant Language) as a key. |
|||
|
|||
Read more about it at: https://docs.squidex.io/04-guides/02-api.html |
|||
File diff suppressed because it is too large
Loading…
Reference in new issue