diff --git a/src/Serval/src/Serval.Client/Client.g.cs b/src/Serval/src/Serval.Client/Client.g.cs
index b10b41c7..ee4ce398 100644
--- a/src/Serval/src/Serval.Client/Client.g.cs
+++ b/src/Serval/src/Serval.Client/Client.g.cs
@@ -4218,7 +4218,7 @@ public partial interface ITranslationEnginesClient
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Add a corpus to a translation engine
+ /// Add a corpus to a translation engine (obsolete - use parallel corpora instead)
///
///
/// ## Parameters
@@ -4242,20 +4242,22 @@ public partial interface ITranslationEnginesClient
/// The corpus configuration (see remarks)
/// The added corpus
/// A server side error occurred.
+ [System.Obsolete]
System.Threading.Tasks.Task AddCorpusAsync(string id, TranslationCorpusConfig corpusConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Get all corpora for a translation engine
+ /// Get all corpora for a translation engine (obsolete - use parallel corpora instead)
///
/// The translation engine id
/// The corpora
/// A server side error occurred.
+ [System.Obsolete]
System.Threading.Tasks.Task> GetAllCorporaAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Update a corpus with a new set of files
+ /// Update a corpus with a new set of files (obsolete - use parallel corpora instead)
///
///
/// See posting a new corpus for details of use. Will completely replace corpus' file associations.
@@ -4266,16 +4268,18 @@ public partial interface ITranslationEnginesClient
/// The corpus configuration
/// The corpus was updated successfully
/// A server side error occurred.
+ [System.Obsolete]
System.Threading.Tasks.Task UpdateCorpusAsync(string id, string corpusId, TranslationCorpusUpdateConfig corpusConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Get the configuration of a corpus for a translation engine
+ /// Get the configuration of a corpus for a translation engine (obsolete - use parallel corpora instead)
///
/// The translation engine id
/// The corpus id
/// The corpus configuration
/// A server side error occurred.
+ [System.Obsolete]
System.Threading.Tasks.Task GetCorpusAsync(string id, string corpusId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
@@ -4355,7 +4359,7 @@ public partial interface ITranslationEnginesClient
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Get all pretranslations in a corpus of a translation engine
+ /// Get all pretranslations in a corpus or parallel corpus of a translation engine
///
///
/// Pretranslations are arranged in a list of dictionaries with the following fields per pretranslation:
@@ -4369,7 +4373,7 @@ public partial interface ITranslationEnginesClient
///
Only pretranslations for the most recent successful build of the engine are returned.
///
/// The translation engine id
- /// The corpus id
+ /// The corpus id or parallel corpus id
/// The text id (optional)
/// The pretranslations
/// A server side error occurred.
@@ -4377,7 +4381,7 @@ public partial interface ITranslationEnginesClient
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Get all pretranslations for the specified text in a corpus of a translation engine
+ /// Get all pretranslations for the specified text in a corpus or parallel corpus of a translation engine
///
///
/// Pretranslations are arranged in a list of dictionaries with the following fields per pretranslation:
@@ -4390,7 +4394,7 @@ public partial interface ITranslationEnginesClient
///
Only pretranslations for the most recent successful build of the engine are returned.
///
/// The translation engine id
- /// The corpus id
+ /// The corpus id or parallel corpus id
/// The text id
/// The pretranslations
/// A server side error occurred.
@@ -4416,7 +4420,7 @@ public partial interface ITranslationEnginesClient
///
Both scripture and non-scripture text in the USFM is parsed and grouped according to [this wiki](https://github.com/sillsdev/serval/wiki/USFM-Parsing-and-Translation).
///
/// The translation engine id
- /// The corpus id
+ /// The corpus id or parallel corpus id
/// The text id
/// The source[s] of the data to populate the USFM file with.
/// The book in USFM format
@@ -5542,7 +5546,7 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Add a corpus to a translation engine
+ /// Add a corpus to a translation engine (obsolete - use parallel corpora instead)
///
///
/// ## Parameters
@@ -5566,6 +5570,7 @@ public string BaseUrl
/// The corpus configuration (see remarks)
/// The added corpus
/// A server side error occurred.
+ [System.Obsolete]
public virtual async System.Threading.Tasks.Task AddCorpusAsync(string id, TranslationCorpusConfig corpusConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (id == null)
@@ -5678,11 +5683,12 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Get all corpora for a translation engine
+ /// Get all corpora for a translation engine (obsolete - use parallel corpora instead)
///
/// The translation engine id
/// The corpora
/// A server side error occurred.
+ [System.Obsolete]
public virtual async System.Threading.Tasks.Task> GetAllCorporaAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (id == null)
@@ -5782,7 +5788,7 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Update a corpus with a new set of files
+ /// Update a corpus with a new set of files (obsolete - use parallel corpora instead)
///
///
/// See posting a new corpus for details of use. Will completely replace corpus' file associations.
@@ -5793,6 +5799,7 @@ public string BaseUrl
/// The corpus configuration
/// The corpus was updated successfully
/// A server side error occurred.
+ [System.Obsolete]
public virtual async System.Threading.Tasks.Task UpdateCorpusAsync(string id, string corpusId, TranslationCorpusUpdateConfig corpusConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (id == null)
@@ -5909,12 +5916,13 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Get the configuration of a corpus for a translation engine
+ /// Get the configuration of a corpus for a translation engine (obsolete - use parallel corpora instead)
///
/// The translation engine id
/// The corpus id
/// The corpus configuration
/// A server side error occurred.
+ [System.Obsolete]
public virtual async System.Threading.Tasks.Task GetCorpusAsync(string id, string corpusId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (id == null)
@@ -6699,7 +6707,7 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Get all pretranslations in a corpus of a translation engine
+ /// Get all pretranslations in a corpus or parallel corpus of a translation engine
///
///
/// Pretranslations are arranged in a list of dictionaries with the following fields per pretranslation:
@@ -6713,7 +6721,7 @@ public string BaseUrl
///
Only pretranslations for the most recent successful build of the engine are returned.
///
/// The translation engine id
- /// The corpus id
+ /// The corpus id or parallel corpus id
/// The text id (optional)
/// The pretranslations
/// A server side error occurred.
@@ -6833,7 +6841,7 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Get all pretranslations for the specified text in a corpus of a translation engine
+ /// Get all pretranslations for the specified text in a corpus or parallel corpus of a translation engine
///
///
/// Pretranslations are arranged in a list of dictionaries with the following fields per pretranslation:
@@ -6846,7 +6854,7 @@ public string BaseUrl
///
Only pretranslations for the most recent successful build of the engine are returned.
///
/// The translation engine id
- /// The corpus id
+ /// The corpus id or parallel corpus id
/// The text id
/// The pretranslations
/// A server side error occurred.
@@ -6982,7 +6990,7 @@ public string BaseUrl
///
Both scripture and non-scripture text in the USFM is parsed and grouped according to [this wiki](https://github.com/sillsdev/serval/wiki/USFM-Parsing-and-Translation).
///
/// The translation engine id
- /// The corpus id
+ /// The corpus id or parallel corpus id
/// The text id
/// The source[s] of the data to populate the USFM file with.
/// The book in USFM format
@@ -9847,12 +9855,15 @@ public partial class TranslationBuild
public partial class TrainingCorpus
{
[Newtonsoft.Json.JsonProperty("corpus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [System.Obsolete]
public ResourceLink? Corpus { get; set; } = default!;
[Newtonsoft.Json.JsonProperty("textIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [System.Obsolete]
public System.Collections.Generic.IList? TextIds { get; set; } = default!;
[Newtonsoft.Json.JsonProperty("scriptureRange", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [System.Obsolete]
public string? ScriptureRange { get; set; } = default!;
[Newtonsoft.Json.JsonProperty("parallelCorpus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
@@ -9885,12 +9896,15 @@ public partial class ParallelCorpusFilter
public partial class PretranslateCorpus
{
[Newtonsoft.Json.JsonProperty("corpus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [System.Obsolete]
public ResourceLink? Corpus { get; set; } = default!;
[Newtonsoft.Json.JsonProperty("textIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [System.Obsolete]
public System.Collections.Generic.IList? TextIds { get; set; } = default!;
[Newtonsoft.Json.JsonProperty("scriptureRange", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [System.Obsolete]
public string? ScriptureRange { get; set; } = default!;
[Newtonsoft.Json.JsonProperty("parallelCorpus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
@@ -9922,12 +9936,15 @@ public partial class TranslationBuildConfig
public partial class TrainingCorpusConfig
{
[Newtonsoft.Json.JsonProperty("corpusId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [System.Obsolete]
public string? CorpusId { get; set; } = default!;
[Newtonsoft.Json.JsonProperty("textIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [System.Obsolete]
public System.Collections.Generic.IList? TextIds { get; set; } = default!;
[Newtonsoft.Json.JsonProperty("scriptureRange", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [System.Obsolete]
public string? ScriptureRange { get; set; } = default!;
[Newtonsoft.Json.JsonProperty("parallelCorpusId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
@@ -9960,12 +9977,15 @@ public partial class ParallelCorpusFilterConfig
public partial class PretranslateCorpusConfig
{
[Newtonsoft.Json.JsonProperty("corpusId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [System.Obsolete]
public string? CorpusId { get; set; } = default!;
[Newtonsoft.Json.JsonProperty("textIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [System.Obsolete]
public System.Collections.Generic.IList? TextIds { get; set; } = default!;
[Newtonsoft.Json.JsonProperty("scriptureRange", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [System.Obsolete]
public string? ScriptureRange { get; set; } = default!;
[Newtonsoft.Json.JsonProperty("parallelCorpusId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
diff --git a/src/Serval/src/Serval.Translation/Contracts/PretranslateCorpusConfigDto.cs b/src/Serval/src/Serval.Translation/Contracts/PretranslateCorpusConfigDto.cs
index a88ebe3b..58756e3a 100644
--- a/src/Serval/src/Serval.Translation/Contracts/PretranslateCorpusConfigDto.cs
+++ b/src/Serval/src/Serval.Translation/Contracts/PretranslateCorpusConfigDto.cs
@@ -2,10 +2,13 @@
public record PretranslateCorpusConfigDto
{
+ [Obsolete]
public string? CorpusId { get; init; }
+ [Obsolete]
public IReadOnlyList? TextIds { get; init; }
+ [Obsolete]
public string? ScriptureRange { get; init; }
public string? ParallelCorpusId { get; init; }
diff --git a/src/Serval/src/Serval.Translation/Contracts/PretranslateCorpusDto.cs b/src/Serval/src/Serval.Translation/Contracts/PretranslateCorpusDto.cs
index 9aa6f939..14fde716 100644
--- a/src/Serval/src/Serval.Translation/Contracts/PretranslateCorpusDto.cs
+++ b/src/Serval/src/Serval.Translation/Contracts/PretranslateCorpusDto.cs
@@ -2,10 +2,13 @@
public record PretranslateCorpusDto
{
+ [Obsolete]
public ResourceLinkDto? Corpus { get; init; }
+ [Obsolete]
public IReadOnlyList? TextIds { get; init; }
+ [Obsolete]
public string? ScriptureRange { get; init; }
public ResourceLinkDto? ParallelCorpus { get; init; }
diff --git a/src/Serval/src/Serval.Translation/Contracts/TrainingCorpusConfigDto.cs b/src/Serval/src/Serval.Translation/Contracts/TrainingCorpusConfigDto.cs
index c8161a5f..a70bf5ab 100644
--- a/src/Serval/src/Serval.Translation/Contracts/TrainingCorpusConfigDto.cs
+++ b/src/Serval/src/Serval.Translation/Contracts/TrainingCorpusConfigDto.cs
@@ -2,8 +2,13 @@ namespace Serval.Translation.Contracts;
public record TrainingCorpusConfigDto
{
+ [Obsolete]
public string? CorpusId { get; init; }
+
+ [Obsolete]
public IReadOnlyList? TextIds { get; init; }
+
+ [Obsolete]
public string? ScriptureRange { get; init; }
public string? ParallelCorpusId { get; init; }
diff --git a/src/Serval/src/Serval.Translation/Contracts/TrainingCorpusDto.cs b/src/Serval/src/Serval.Translation/Contracts/TrainingCorpusDto.cs
index f734f43b..f958a07b 100644
--- a/src/Serval/src/Serval.Translation/Contracts/TrainingCorpusDto.cs
+++ b/src/Serval/src/Serval.Translation/Contracts/TrainingCorpusDto.cs
@@ -2,8 +2,13 @@ namespace Serval.Translation.Contracts;
public record TrainingCorpusDto
{
+ [Obsolete]
public ResourceLinkDto? Corpus { get; init; }
+
+ [Obsolete]
public IReadOnlyList? TextIds { get; init; }
+
+ [Obsolete]
public string? ScriptureRange { get; init; }
public ResourceLinkDto? ParallelCorpus { get; init; }
diff --git a/src/Serval/src/Serval.Translation/Controllers/TranslationEnginesController.cs b/src/Serval/src/Serval.Translation/Controllers/TranslationEnginesController.cs
index aeb87b96..9b735a01 100644
--- a/src/Serval/src/Serval.Translation/Controllers/TranslationEnginesController.cs
+++ b/src/Serval/src/Serval.Translation/Controllers/TranslationEnginesController.cs
@@ -1,5 +1,7 @@
namespace Serval.Translation.Controllers;
+#pragma warning disable CS0612 // Type or member is obsolete
+
[ApiVersion(1.0)]
[Route("api/v{version:apiVersion}/translation/engines")]
[OpenApiTag("Translation Engines")]
@@ -315,7 +317,7 @@ await _engineService.TrainSegmentPairAsync(
}
///
- /// Add a corpus to a translation engine
+ /// Add a corpus to a translation engine (obsolete - use parallel corpora instead)
///
///
/// ## Parameters
@@ -346,6 +348,7 @@ await _engineService.TrainSegmentPairAsync(
/// The authenticated client cannot perform the operation or does not own the translation engine.
/// The engine does not exist.
/// A necessary service is currently unavailable. Check `/health` for more details.
+ [Obsolete("This endpoint is obsolete. Use parallel corpora instead.")]
[Authorize(Scopes.UpdateTranslationEngines)]
[HttpPost("{id}/corpora")]
[ProducesResponseType(StatusCodes.Status201Created)]
@@ -371,7 +374,7 @@ CancellationToken cancellationToken
}
///
- /// Update a corpus with a new set of files
+ /// Update a corpus with a new set of files (obsolete - use parallel corpora instead)
///
///
/// See posting a new corpus for details of use. Will completely replace corpus' file associations.
@@ -388,6 +391,7 @@ CancellationToken cancellationToken
/// The authenticated client cannot perform the operation or does not own the translation engine.
/// The engine or corpus does not exist.
/// A necessary service is currently unavailable. Check `/health` for more details.
+ [Obsolete("This endpoint is obsolete. Use parallel corpora instead.")]
[Authorize(Scopes.UpdateTranslationEngines)]
[HttpPatch("{id}/corpora/{corpusId}")]
[ProducesResponseType(StatusCodes.Status200OK)]
@@ -420,7 +424,7 @@ corpusConfig.TargetFiles is null
}
///
- /// Get all corpora for a translation engine
+ /// Get all corpora for a translation engine (obsolete - use parallel corpora instead)
///
/// The translation engine id
///
@@ -429,6 +433,7 @@ corpusConfig.TargetFiles is null
/// The authenticated client cannot perform the operation or does not own the translation engine
/// The engine does not exist
/// A necessary service is currently unavailable. Check `/health` for more details.
+ [Obsolete("This endpoint is obsolete. Use parallel corpora instead.")]
[Authorize(Scopes.ReadTranslationEngines)]
[HttpGet("{id}/corpora")]
[ProducesResponseType(StatusCodes.Status200OK)]
@@ -447,7 +452,7 @@ CancellationToken cancellationToken
}
///
- /// Get the configuration of a corpus for a translation engine
+ /// Get the configuration of a corpus for a translation engine (obsolete - use parallel corpora instead)
///
/// The translation engine id
/// The corpus id
@@ -457,6 +462,7 @@ CancellationToken cancellationToken
/// The authenticated client cannot perform the operation or does not own the translation engine.
/// The engine or corpus does not exist.
/// A necessary service is currently unavailable. Check `/health` for more details.
+ [Obsolete("This endpoint is obsolete. Use parallel corpora instead.")]
[Authorize(Scopes.ReadTranslationEngines)]
[HttpGet("{id}/corpora/{corpusId}", Name = Endpoints.GetTranslationCorpus)]
[ProducesResponseType(StatusCodes.Status200OK)]
@@ -700,7 +706,7 @@ CancellationToken cancellationToken
}
///
- /// Get all pretranslations in a corpus of a translation engine
+ /// Get all pretranslations in a corpus or parallel corpus of a translation engine
///
///
/// Pretranslations are arranged in a list of dictionaries with the following fields per pretranslation:
@@ -714,7 +720,7 @@ CancellationToken cancellationToken
/// Only pretranslations for the most recent successful build of the engine are returned.
///
/// The translation engine id
- /// The corpus id
+ /// The corpus id or parallel corpus id
/// The text id (optional)
///
/// The pretranslations
@@ -763,7 +769,7 @@ CancellationToken cancellationToken
}
///
- /// Get all pretranslations for the specified text in a corpus of a translation engine
+ /// Get all pretranslations for the specified text in a corpus or parallel corpus of a translation engine
///
///
/// Pretranslations are arranged in a list of dictionaries with the following fields per pretranslation:
@@ -776,7 +782,7 @@ CancellationToken cancellationToken
/// Only pretranslations for the most recent successful build of the engine are returned.
///
/// The translation engine id
- /// The corpus id
+ /// The corpus id or parallel corpus id
/// The text id
///
/// The pretranslations
@@ -843,7 +849,7 @@ CancellationToken cancellationToken
/// Both scripture and non-scripture text in the USFM is parsed and grouped according to [this wiki](https://github.com/sillsdev/serval/wiki/USFM-Parsing-and-Translation).
///
/// The translation engine id
- /// The corpus id
+ /// The corpus id or parallel corpus id
/// The text id
/// The source[s] of the data to populate the USFM file with.
///
@@ -1760,3 +1766,5 @@ private static ModelDownloadUrlDto Map(ModelDownloadUrl source)
};
}
}
+
+#pragma warning restore CS0612 // Type or member is obsolete
diff --git a/src/Serval/test/Serval.ApiServer.IntegrationTests/TranslationEngineTests.cs b/src/Serval/test/Serval.ApiServer.IntegrationTests/TranslationEngineTests.cs
index 1726353f..d66b3557 100644
--- a/src/Serval/test/Serval.ApiServer.IntegrationTests/TranslationEngineTests.cs
+++ b/src/Serval/test/Serval.ApiServer.IntegrationTests/TranslationEngineTests.cs
@@ -5,6 +5,8 @@
namespace Serval.ApiServer;
+#pragma warning disable CS0612 // Type or member is obsolete
+
[TestFixture]
[Category("Integration")]
public class TranslationEngineTests
@@ -2379,3 +2381,5 @@ protected override void DisposeManagedResources()
}
}
}
+
+#pragma warning restore CS0612 // Type or member is obsolete
diff --git a/src/Serval/test/Serval.E2ETests/ServalApiTests.cs b/src/Serval/test/Serval.E2ETests/ServalApiTests.cs
index 9053e8b9..2fb9f86a 100644
--- a/src/Serval/test/Serval.E2ETests/ServalApiTests.cs
+++ b/src/Serval/test/Serval.E2ETests/ServalApiTests.cs
@@ -1,5 +1,7 @@
namespace Serval.E2ETests;
+#pragma warning disable CS0612 // Type or member is obsolete
+
[TestFixture]
[Category("E2E")]
public class ServalApiTests
@@ -470,3 +472,5 @@ public async Task OneTimeTearDown()
await _helperClient.DisposeAsync();
}
}
+
+#pragma warning restore CS0612 // Type or member is obsolete
diff --git a/src/Serval/test/Serval.E2ETests/ServalClientHelper.cs b/src/Serval/test/Serval.E2ETests/ServalClientHelper.cs
index e9a2ff15..d489cf9a 100644
--- a/src/Serval/test/Serval.E2ETests/ServalClientHelper.cs
+++ b/src/Serval/test/Serval.E2ETests/ServalClientHelper.cs
@@ -1,5 +1,7 @@
namespace Serval.E2ETests;
+#pragma warning disable CS0612 // Type or member is obsolete
+
public class ServalClientHelper : IAsyncDisposable
{
public DataFilesClient DataFilesClient { get; }
@@ -416,3 +418,5 @@ public ValueTask DisposeAsync()
return new ValueTask(Task.CompletedTask);
}
}
+
+#pragma warning restore CS0612 // Type or member is obsolete