Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
  • coscine/backend/scripts/metadataextractorcron
1 result
Select Git revision
Loading items
Show changes
Commits on Source (4)
Showing
with 606 additions and 354 deletions
# Metadata Extractor Cronjob
# Coscine.MetadataExtractorCron - the C# cronjob for the Metadata Extractor API
[[_TOC_]]
## 📝 Overview
This application goes daily over all resources in Coscine which have the Metadata Extraction activated and executes it. It is a metadata extractor that extracts metadata from files and stores it in a database. It is designed to be run as a cron job on a server. The extracted metadata includes information such as the title, author, and creation date of the PDF files. The program uses C#, Python and several third-party libraries to extract the metadata and interact with the database.
This cronjob interacts with the Coscine Api and the Metadata Extraction API to extract metadata from research data.
## ⚙️ Configuration
Before you can run and use the script, you need to ensure that the following dependencies and prerequisites are in place:
### Features
- **Configuration-driven**: Behavior driven by settings defined in configuration files and environment variables (see `appsettings.json`).
- **Logging**: Extensive logging capabilities to track the process and troubleshoot issues.
1. The project's referenced .NET SDK(s) must be installed. Please refer to the project's source code for information on which .NET SDK(s) are required.
## ⚙️ Configuration
Once you have all the necessary dependencies and prerequisites in place, you should be able to run and use this script.
The deployment script uses a configuration class `MetadataExtractorCronConfiguration` to manage settings such as:
- `IsEnabled`: Toggles the extractor on or off.
- `MetadataExtractionUrl`: Specifies the metadata extraction service URL.
- `DetectionByteLimit`: Specifies limit the metadata extraction cronjob should adhere to.
- `Logger` Configuration: Specifies the logging level and output directory.
### Example `appsettings.json`
```json
{
"MetadataExtractorConfiguration": {
"IsEnabled": true,
"MetadataExtractionUrl": "https://metadataextractor.otc.coscine.dev/",
"DetectionByteLimit": 16000000,
"Logger": {
"LogLevel": "Trace",
"LogHome": "C:\\coscine\\logs\\MetadataExtractorCron\\"
}
}
}
```
## 📖 Usage
......@@ -20,9 +39,11 @@ To get started with this project, you will need to ensure you have configured an
1. Execute the built executable (`.exe`)
To use the **MetadataExtractorCron**, execute the main program with appropriate command-line arguments to control its operation.
## 👥 Contributing
As an open source plattform and project, we welcome contributions from our community in any form. You can do so by submitting bug reports or feature requests, or by directly contributing to Coscine's source code. To submit your contribution please follow our [Contributing Guideline](https://git.rwth-aachen.de/coscine/docs/public/wiki/-/blob/master/Contributing%20To%20Coscine.md).
As an open source platform and project, we welcome contributions from our community in any form. You can do so by submitting bug reports or feature requests, or by directly contributing to Coscine's source code. To submit your contribution please follow our [Contributing Guideline](https://git.rwth-aachen.de/coscine/docs/public/wiki/-/blob/master/Contributing%20To%20Coscine.md).
## 📄 License
......@@ -43,5 +64,3 @@ By following these simple steps, you can get the support you need to use Coscine
External users can find the _Releases and Changelog_ inside each project's repository. The repository contains a section for Releases (`Deployments > Releases`), where users can find the latest release changelog and source. Withing the Changelog you can find a list of all the changes made in that particular release and version.
By regularly checking for new releases and changes in the Changelog, you can stay up-to-date with the latest improvements and bug fixes by our team and community!
#!/bin/bash
# --------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Generate C# API Client using OpenAPI Generator:
# --------------------------------------------------------------------------------------------------------------------------------------------------------------------
# This script generates a C# API client based on the OpenAPI specification.
#
# The actions performed are:
# - Downloading the OpenAPI generator CLI tool.
# - Generating the API client code.
# - Deleting existing API client source files.
# - Copying the newly generated API client source to the project directory.
# - Replacing the README.md file.
# - Cleaning up temporary files and the downloaded tool.
#
# Defined variables:
GENERATOR_URL="https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.1/openapi-generator-cli-7.0.1.jar" # URL to the OpenAPI generator JAR file
GENERATOR_JAR="openapi-generator-cli.jar" # The name of the OpenAPI generator JAR file
OUTPUT_DIR="temp" # The temporary directory for generated files
ARTIFACT_ID="Coscine.MetadataExtractor.Core" # The artifact ID for the API client
PACKAGE_NAME="Coscine.MetadataExtractor.Core" # The package name for the API client
API_SPEC_URL="https://metadataextractor.otc.coscine.dev/swagger.json" # URL to the OpenAPI spec file
# --------------------------------------------------------------------------------------------------------------------------------------------------------------------
# ANSI color codes for styling
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
CYAN='\033[0;36m'
NC='\033[0m' # No Color
# Download the OpenAPI generator JAR file
echo -e "${CYAN}Downloading the OpenAPI generator JAR file...${NC}"
curl -o "$GENERATOR_JAR" "$GENERATOR_URL"
# Run the OpenAPI generator
echo -e "${CYAN}Running the OpenAPI generator...${NC}"
java -jar "$GENERATOR_JAR" generate -i "$API_SPEC_URL" -g csharp -o "$OUTPUT_DIR" --artifact-id "$ARTIFACT_ID" --package-name "$PACKAGE_NAME" --skip-validate-spec --server-variables=host=localhost:7206,basePath=coscine
echo -e "${GREEN}API client generation complete.${NC}"
# Delete the current API client source
echo -e "${YELLOW}Deleting current API client source...${NC}"
rm -rf "src/$PACKAGE_NAME"
rm -rf "src/${PACKAGE_NAME}.Test"
# Copy the generated API client source to the src directory
echo -e "${CYAN}Copying generated API client source to src directory...${NC}"
cp -R "$OUTPUT_DIR/src/$PACKAGE_NAME" "src/$PACKAGE_NAME"
cp -R "$OUTPUT_DIR/src/${PACKAGE_NAME}.Test" "src/${PACKAGE_NAME}.Test"
# Remove the temp directory and the generator JAR file
echo -e "${YELLOW}Cleaning up...${NC}"
rm -rf "$OUTPUT_DIR"
rm -f "$GENERATOR_JAR"
echo -e "${GREEN}Finished.${NC}"
......@@ -3,13 +3,26 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters;
using System.Text;
using System.Threading;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using RestSharp;
......@@ -17,7 +30,7 @@ using RestSharp.Serializers;
using RestSharpMethod = RestSharp.Method;
using Polly;
namespace Org.OpenAPITools.Client
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// Allows RestSharp to Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON.
......@@ -25,7 +38,6 @@ namespace Org.OpenAPITools.Client
internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer
{
private readonly IReadableConfiguration _configuration;
private static readonly string _contentType = "application/json";
private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings
{
// OpenAPI generated types generally hide default constructors.
......@@ -57,10 +69,10 @@ namespace Org.OpenAPITools.Client
/// <returns>A JSON string.</returns>
public string Serialize(object obj)
{
if (obj != null && obj is Org.OpenAPITools.Model.AbstractOpenAPISchema)
if (obj != null && obj is Coscine.MetadataExtractor.Core.Model.AbstractOpenAPISchema)
{
// the object to be serialized is an oneOf/anyOf schema
return ((Org.OpenAPITools.Model.AbstractOpenAPISchema)obj).ToJson();
return ((Coscine.MetadataExtractor.Core.Model.AbstractOpenAPISchema)obj).ToJson();
}
else
{
......@@ -138,17 +150,13 @@ namespace Org.OpenAPITools.Client
public ISerializer Serializer => this;
public IDeserializer Deserializer => this;
public string[] AcceptedContentTypes => RestSharp.Serializers.ContentType.JsonAccept;
public string[] AcceptedContentTypes => RestSharp.ContentType.JsonAccept;
public SupportsContentType SupportsContentType => contentType =>
contentType.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) ||
contentType.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase);
contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) ||
contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase);
public string ContentType
{
get { return _contentType; }
set { throw new InvalidOperationException("Not allowed to set content type."); }
}
public ContentType ContentType { get; set; } = RestSharp.ContentType.Json;
public DataFormat DataFormat => DataFormat.Json;
}
......@@ -195,7 +203,7 @@ namespace Org.OpenAPITools.Client
/// </summary>
public ApiClient()
{
_baseUrl = Org.OpenAPITools.Client.GlobalConfiguration.Instance.BasePath;
_baseUrl = Coscine.MetadataExtractor.Core.Client.GlobalConfiguration.Instance.BasePath;
}
/// <summary>
......@@ -421,7 +429,7 @@ namespace Org.OpenAPITools.Client
return transformed;
}
private ApiResponse<T> Exec<T>(RestRequest req, RequestOptions options, IReadableConfiguration configuration)
private ApiResponse<T> Exec<T>(RestRequest request, RequestOptions options, IReadableConfiguration configuration)
{
var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl;
......@@ -441,32 +449,33 @@ namespace Org.OpenAPITools.Client
CookieContainer = cookies,
MaxTimeout = configuration.Timeout,
Proxy = configuration.Proxy,
UserAgent = configuration.UserAgent
UserAgent = configuration.UserAgent,
UseDefaultCredentials = configuration.UseDefaultCredentials,
RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
};
RestClient client = new RestClient(clientOptions)
.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration));
InterceptRequest(req);
using (RestClient client = new RestClient(clientOptions,
configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration))))
{
InterceptRequest(request);
RestResponse<T> response;
if (RetryConfiguration.RetryPolicy != null)
{
var policy = RetryConfiguration.RetryPolicy;
var policyResult = policy.ExecuteAndCapture(() => client.Execute(req));
response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize<T>(policyResult.Result) : new RestResponse<T>
var policyResult = policy.ExecuteAndCapture(() => client.Execute(request));
response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize<T>(policyResult.Result) : new RestResponse<T>(request)
{
Request = req,
ErrorException = policyResult.FinalException
};
}
else
{
response = client.Execute<T>(req);
response = client.Execute<T>(request);
}
// if the response type is oneOf/anyOf, call FromJSON to deserialize the data
if (typeof(Org.OpenAPITools.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T)))
if (typeof(Coscine.MetadataExtractor.Core.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T)))
{
try
{
......@@ -490,7 +499,7 @@ namespace Org.OpenAPITools.Client
response.Data = (T)(object)response.Content;
}
InterceptResponse(req, response);
InterceptResponse(request, response);
var result = ToApiResponse(response);
if (response.ErrorMessage != null)
......@@ -526,8 +535,9 @@ namespace Org.OpenAPITools.Client
}
return result;
}
}
private async Task<ApiResponse<T>> ExecAsync<T>(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
private async Task<ApiResponse<T>> ExecAsync<T>(RestRequest request, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl;
......@@ -536,32 +546,32 @@ namespace Org.OpenAPITools.Client
ClientCertificates = configuration.ClientCertificates,
MaxTimeout = configuration.Timeout,
Proxy = configuration.Proxy,
UserAgent = configuration.UserAgent
UserAgent = configuration.UserAgent,
UseDefaultCredentials = configuration.UseDefaultCredentials
};
RestClient client = new RestClient(clientOptions)
.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration));
InterceptRequest(req);
using (RestClient client = new RestClient(clientOptions,
configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration))))
{
InterceptRequest(request);
RestResponse<T> response;
if (RetryConfiguration.AsyncRetryPolicy != null)
{
var policy = RetryConfiguration.AsyncRetryPolicy;
var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(req, ct), cancellationToken).ConfigureAwait(false);
response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize<T>(policyResult.Result) : new RestResponse<T>
var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false);
response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize<T>(policyResult.Result) : new RestResponse<T>(request)
{
Request = req,
ErrorException = policyResult.FinalException
};
}
else
{
response = await client.ExecuteAsync<T>(req, cancellationToken).ConfigureAwait(false);
response = await client.ExecuteAsync<T>(request, cancellationToken).ConfigureAwait(false);
}
// if the response type is oneOf/anyOf, call FromJSON to deserialize the data
if (typeof(Org.OpenAPITools.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T)))
if (typeof(Coscine.MetadataExtractor.Core.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T)))
{
response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content });
}
......@@ -574,7 +584,7 @@ namespace Org.OpenAPITools.Client
response.Data = (T)(object)response.RawBytes;
}
InterceptResponse(req, response);
InterceptResponse(request, response);
var result = ToApiResponse(response);
if (response.ErrorMessage != null)
......@@ -610,6 +620,7 @@ namespace Org.OpenAPITools.Client
}
return result;
}
}
#region IAsynchronousClient
/// <summary>
......
......@@ -3,11 +3,14 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace Org.OpenAPITools.Client
using System;
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// API Exception
......
......@@ -3,14 +3,16 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections.Generic;
using System.Net;
namespace Org.OpenAPITools.Client
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// Provides a non-generic contract for the ApiResponse wrapper.
......
......@@ -3,15 +3,22 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
namespace Org.OpenAPITools.Client
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// Utility functions providing some benefit to API client consumers.
......@@ -50,15 +57,13 @@ namespace Org.OpenAPITools.Client
}
else if (value is IDictionary dictionary)
{
if (collectionFormat == "deepObject")
{
if(collectionFormat == "deepObject") {
foreach (DictionaryEntry entry in dictionary)
{
parameters.Add(name + "[" + entry.Key + "]", ParameterToString(entry.Value));
}
}
else
{
else {
foreach (DictionaryEntry entry in dictionary)
{
parameters.Add(entry.Key.ToString(), ParameterToString(entry.Value));
......@@ -97,8 +102,14 @@ namespace Org.OpenAPITools.Client
return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat);
if (obj is bool boolean)
return boolean ? "true" : "false";
if (obj is ICollection collection)
return string.Join(",", collection.Cast<object>());
if (obj is ICollection collection) {
List<string> entries = new List<string>();
foreach (var entry in collection)
entries.Add(ParameterToString(entry, configuration));
return string.Join(",", entries);
}
if (obj is Enum && HasEnumMemberAttrValue(obj))
return GetEnumMemberAttrValue(obj);
return Convert.ToString(obj, CultureInfo.InvariantCulture);
}
......@@ -197,5 +208,40 @@ namespace Org.OpenAPITools.Client
return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json");
}
/// <summary>
/// Is the Enum decorated with EnumMember Attribute
/// </summary>
/// <param name="enumVal"></param>
/// <returns>true if found</returns>
private static bool HasEnumMemberAttrValue(object enumVal)
{
if (enumVal == null)
throw new ArgumentNullException(nameof(enumVal));
var enumType = enumVal.GetType();
var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException());
var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType<EnumMemberAttribute>().FirstOrDefault();
if (attr != null) return true;
return false;
}
/// <summary>
/// Get the EnumMember value
/// </summary>
/// <param name="enumVal"></param>
/// <returns>EnumMember value as string otherwise null</returns>
private static string GetEnumMemberAttrValue(object enumVal)
{
if (enumVal == null)
throw new ArgumentNullException(nameof(enumVal));
var enumType = enumVal.GetType();
var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException());
var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType<EnumMemberAttribute>().FirstOrDefault();
if (attr != null)
{
return attr.Value;
}
return null;
}
}
}
......@@ -3,16 +3,24 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Net.Http;
using System.Net.Security;
namespace Org.OpenAPITools.Client
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// Represents a set of configuration settings
......@@ -50,6 +58,11 @@ namespace Org.OpenAPITools.Client
string.Format("Error calling {0}: {1}", methodName, response.RawContent),
response.RawContent, response.Headers);
}
if (status == 0)
{
return new ApiException(status,
string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText);
}
return null;
};
......@@ -63,6 +76,8 @@ namespace Org.OpenAPITools.Client
/// </summary>
private string _basePath;
private bool _useDefaultCredentials = false;
/// <summary>
/// Gets or sets the API key based on the authentication name.
/// This is the key and value comprising the "secret" for accessing an API.
......@@ -168,11 +183,21 @@ namespace Org.OpenAPITools.Client
/// <summary>
/// Gets or sets the base path for API access.
/// </summary>
public virtual string BasePath {
public virtual string BasePath
{
get { return _basePath; }
set { _basePath = value; }
}
/// <summary>
/// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false.
/// </summary>
public virtual bool UseDefaultCredentials
{
get { return _useDefaultCredentials; }
set { _useDefaultCredentials = value; }
}
/// <summary>
/// Gets or sets the default header.
/// </summary>
......@@ -437,7 +462,7 @@ namespace Org.OpenAPITools.Client
/// <return>The operation server URL.</return>
public string GetOperationServerUrl(string operation, int index, Dictionary<string, string> inputVariables)
{
if (OperationServers.TryGetValue(operation, out var operationServer))
if (operation != null && OperationServers.TryGetValue(operation, out var operationServer))
{
return GetServerUrl(operationServer, index, inputVariables);
}
......@@ -497,6 +522,11 @@ namespace Org.OpenAPITools.Client
return url;
}
/// <summary>
/// Gets and Sets the RemoteCertificateValidationCallback
/// </summary>
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
#endregion Properties
#region Methods
......@@ -506,10 +536,10 @@ namespace Org.OpenAPITools.Client
/// </summary>
public static string ToDebugReport()
{
string report = "C# SDK (Org.OpenAPITools) Debug Report:\n";
string report = "C# SDK (Coscine.MetadataExtractor.Core) Debug Report:\n";
report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n";
report += " Version of the API: 0.1.1\n";
report += " Version of the API: 0.4.3\n";
report += " SDK Package Version: 1.0.0\n";
return report;
......@@ -572,6 +602,8 @@ namespace Org.OpenAPITools.Client
TempFolderPath = second.TempFolderPath ?? first.TempFolderPath,
DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat,
ClientCertificates = second.ClientCertificates ?? first.ClientCertificates,
UseDefaultCredentials = second.UseDefaultCredentials,
RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback,
};
return config;
}
......
......@@ -3,11 +3,14 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace Org.OpenAPITools.Client
using System;
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// A delegate to ExceptionFactory method
......
......@@ -3,11 +3,14 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace Org.OpenAPITools.Client
using System.Collections.Generic;
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// <see cref="GlobalConfiguration"/> provides a compile-time extension point for globally configuring
......
......@@ -3,12 +3,12 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace Org.OpenAPITools.Client
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// Http methods supported by swagger
......
......@@ -3,11 +3,14 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace Org.OpenAPITools.Client
using System;
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// Represents configuration aspects required to interact with the API endpoints.
......
......@@ -3,11 +3,15 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace Org.OpenAPITools.Client
using System;
using System.Threading.Tasks;
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// Contract for Asynchronous RESTful API interactions.
......
......@@ -3,15 +3,18 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
namespace Org.OpenAPITools.Client
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// Represents a readable-only configuration contract.
......@@ -97,6 +100,11 @@ namespace Org.OpenAPITools.Client
/// <value>Password.</value>
string Password { get; }
/// <summary>
/// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false.
/// </summary>
bool UseDefaultCredentials { get; }
/// <summary>
/// Get the servers associated with the operation.
/// </summary>
......@@ -123,5 +131,11 @@ namespace Org.OpenAPITools.Client
/// </summary>
/// <value>X509 Certificate collection.</value>
X509CertificateCollection ClientCertificates { get; }
/// <summary>
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
/// overriding certificate errors in the scope of a request.
/// </summary>
RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; }
}
}
......@@ -3,11 +3,15 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
namespace Org.OpenAPITools.Client
using System;
using System.IO;
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// Contract for Synchronous RESTful API interactions.
......
......@@ -3,14 +3,16 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
namespace Org.OpenAPITools.Client
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// A dictionary in which one key has many associated values.
......
......@@ -3,13 +3,13 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Newtonsoft.Json.Converters;
namespace Org.OpenAPITools.Client
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// Formatter for 'date' openapi formats ss defined by full-date - RFC3339
......
......@@ -3,14 +3,17 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
namespace Org.OpenAPITools.Client
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// A container for generalized request inputs. This type allows consumers to extend the request functionality
......@@ -30,7 +33,7 @@ namespace Org.OpenAPITools.Client
public Multimap<string, string> QueryParameters { get; set; }
/// <summary>
/// Header parameters to be applied to to the request.
/// Header parameters to be applied to the request.
/// Keys may have 1 or more values associated.
/// </summary>
public Multimap<string, string> HeaderParameters { get; set; }
......
......@@ -3,7 +3,7 @@
*
* This API extracts RDF triples from files
*
* The version of the OpenAPI document: 0.1.1
* The version of the OpenAPI document: 0.4.3
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
......@@ -11,7 +11,7 @@
using Polly;
using RestSharp;
namespace Org.OpenAPITools.Client
namespace Coscine.MetadataExtractor.Core.Client
{
/// <summary>
/// Configuration class to set the polly retry policies to be applied to the requests.
......
......@@ -2,29 +2,29 @@
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo><!-- setting GenerateAssemblyInfo to false causes this bug https://github.com/dotnet/project-system/issues/3934 -->
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Org.OpenAPITools</AssemblyName>
<PackageId>Org.OpenAPITools</PackageId>
<TargetFramework>net7.0</TargetFramework>
<AssemblyName>Coscine.MetadataExtractor.Core</AssemblyName>
<PackageId>Coscine.MetadataExtractor.Core</PackageId>
<OutputType>Library</OutputType>
<Authors>OpenAPI</Authors>
<Company>OpenAPI</Company>
<AssemblyTitle>OpenAPI Library</AssemblyTitle>
<Description>A library generated from a OpenAPI doc</Description>
<Copyright>No Copyright</Copyright>
<RootNamespace>Org.OpenAPITools</RootNamespace>
<Version>0.1.10</Version>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Org.OpenAPITools.xml</DocumentationFile>
<RootNamespace>Coscine.MetadataExtractor.Core</RootNamespace>
<Version>0.1.11</Version>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Coscine.MetadataExtractor.Core.xml</DocumentationFile>
<RepositoryUrl>https://github.com/GIT_USER_ID/GIT_REPO_ID.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReleaseNotes>Minor update</PackageReleaseNotes>
<Nullable>annotations</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JsonSubTypes" Version="1.9.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="RestSharp" Version="108.0.1" />
<PackageReference Include="JsonSubTypes" Version="2.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="RestSharp" Version="110.2.0" />
<PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
......