mirror of https://github.com/Squidex/squidex.git
7 changed files with 51 additions and 13 deletions
@ -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 |
|||
Loading…
Reference in new issue