diff --git a/.editorconfig b/.editorconfig
index 5d09235785..527399387e 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -479,6 +479,9 @@ dotnet_diagnostic.CA1812.severity = silent
# CA1003: Use generic event handler instances
dotnet_diagnostic.CA1003.severity = silent
+# CA1008: Enums should have zero value
+dotnet_diagnostic.CA1008.severity = silent
+
[*.{cs,vb}]
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
@@ -505,4 +508,8 @@ dotnet_diagnostic.CA5371.severity = suggestion
dotnet_diagnostic.CA5370.severity = suggestion
dotnet_diagnostic.CA5372.severity = suggestion
dotnet_diagnostic.CA5374.severity = warning
-dotnet_diagnostic.CA2251.severity = suggestion
\ No newline at end of file
+dotnet_diagnostic.CA2251.severity = suggestion
+dotnet_style_prefer_collection_expression = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
+dotnet_style_prefer_conditional_expression_over_assignment = true:silent
\ No newline at end of file
diff --git a/docs/opc-publisher/api.md b/docs/opc-publisher/api.md
index 60a6420d8f..ad73a54326 100644
--- a/docs/opc-publisher/api.md
+++ b/docs/opc-publisher/api.md
@@ -26,6 +26,13 @@ POST /v2/pki/https/certs
Add a certificate chain to the trusted https store. The certificate is provided as a concatenated set of certificates with the first the one to add, and the remainder the issuer chain.
+##### Parameters
+
+|Type|Name|Description|Schema|
+|---|---|---|---|
+|**Body**|**body**
*required*|The certificate chain.|string (byte)|
+
+
##### Responses
|HTTP Code|Description|Schema|
@@ -33,6 +40,14 @@ Add a certificate chain to the trusted https store. The certificate is provided
|**200**|Success|No Content|
+##### Consumes
+
+* `application/json`
+* `text/json`
+* `application/*+json`
+* `application/x-msgpack`
+
+
#### ApproveRejectedCertificate
```
@@ -69,6 +84,13 @@ POST /v2/pki/trusted/certs
Add a certificate chain to the specified store. The certificate is provided as a concatenated asn encoded set of certificates with the first the one to add, and the remainder the issuer chain.
+##### Parameters
+
+|Type|Name|Description|Schema|
+|---|---|---|---|
+|**Body**|**body**
*required*|The certificate chain.|string (byte)|
+
+
##### Responses
|HTTP Code|Description|Schema|
@@ -76,6 +98,14 @@ Add a certificate chain to the specified store. The certificate is provided as a
|**200**|Success|No Content|
+##### Consumes
+
+* `application/json`
+* `text/json`
+* `application/*+json`
+* `application/x-msgpack`
+
+
#### RemoveAll
```
@@ -109,7 +139,7 @@ GET /v2/pki/{store}/certs
##### Description
-Get the certificates in the specified certificated store
+Get the certificates in the specified certificate store
##### Parameters
@@ -150,7 +180,8 @@ Add a certificate to the specified store. The certificate is provided as a pfx/p
|Type|Name|Description|Schema|
|---|---|---|---|
|**Path**|**store**
*required*|The store to add the certificate to|enum (Application, Rejected, Trusted, Https, User, Issuer, HttpsIssuer, UserIssuer)|
-|**Query**|**password**
*optional*|The optional password of the blob|string|
+|**Query**|**password**
*optional*|The optional password of the pfx|string|
+|**Body**|**body**
*required*|The pfx encoded certificate.|string (byte)|
##### Responses
@@ -160,6 +191,14 @@ Add a certificate to the specified store. The certificate is provided as a pfx/p
|**200**|Success|No Content|
+##### Consumes
+
+* `application/json`
+* `text/json`
+* `application/*+json`
+* `application/x-msgpack`
+
+
#### RemoveCertificate
```
@@ -260,6 +299,7 @@ Add a certificate revocation list to the specified store. The certificate revoca
|Type|Name|Description|Schema|
|---|---|---|---|
|**Path**|**store**
*required*|The store to add the certificate to|enum (Application, Rejected, Trusted, Https, User, Issuer, HttpsIssuer, UserIssuer)|
+|**Body**|**body**
*required*|The pfx encoded certificate.|string (byte)|
##### Responses
@@ -269,6 +309,14 @@ Add a certificate revocation list to the specified store. The certificate revoca
|**200**|Success|No Content|
+##### Consumes
+
+* `application/json`
+* `text/json`
+* `application/*+json`
+* `application/x-msgpack`
+
+
### Configuration
@@ -329,7 +377,7 @@ Enables clients to update the entire published nodes configuration in one call.
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The new published nodes configuration|[SetConfiguredEndpointsRequestModel](definitions.md#setconfiguredendpointsrequestmodel)|
+|**Body**|**body**
*required*|The new published nodes configuration|[SetConfiguredEndpointsRequestModel](definitions.md#setconfiguredendpointsrequestmodel)|
##### Responses
@@ -362,7 +410,7 @@ Add or update endpoint configuration and nodes on a server. Further information
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The parts of the configuration to add or update.|< [PublishedNodesEntryModel](definitions.md#publishednodesentrymodel) > array|
+|**Body**|**body**
*required*|The parts of the configuration to add or update.|< [PublishedNodesEntryModel](definitions.md#publishednodesentrymodel) > array|
##### Responses
@@ -377,7 +425,6 @@ Add or update endpoint configuration and nodes on a server. Further information
* `application/json`
* `text/json`
* `application/*+json`
-* `application/x-msgpack`
##### Produces
@@ -403,7 +450,7 @@ Configure node values to publish and unpublish in bulk. The group field in the C
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The nodes to publish or unpublish.|[PublishBulkRequestModelRequestEnvelope](definitions.md#publishbulkrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The nodes to publish or unpublish.|[PublishBulkRequestModelRequestEnvelope](definitions.md#publishbulkrequestmodelrequestenvelope)|
##### Responses
@@ -470,7 +517,7 @@ Get the nodes of a published nodes entry object returned earlier from a call to
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The entry model from a call to GetConfiguredEndpoints for which to gather the nodes.|[PublishedNodesEntryModel](definitions.md#publishednodesentrymodel)|
+|**Body**|**body**
*required*|The entry model from a call to GetConfiguredEndpoints for which to gather the nodes.|[PublishedNodesEntryModel](definitions.md#publishednodesentrymodel)|
##### Responses
@@ -511,7 +558,7 @@ Get all published nodes for a server endpoint. The group field that was used in
|Type|Name|Schema|
|---|---|---|
-|**Body**|**body**
*optional*|[PublishedItemListRequestModelRequestEnvelope](definitions.md#publisheditemlistrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|[PublishedItemListRequestModelRequestEnvelope](definitions.md#publisheditemlistrequestmodelrequestenvelope)|
##### Responses
@@ -552,7 +599,7 @@ PublishNodes enables a client to add a set of nodes to be published. Further inf
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request contains the nodes to publish.|[PublishedNodesEntryModel](definitions.md#publishednodesentrymodel)|
+|**Body**|**body**
*required*|The request contains the nodes to publish.|[PublishedNodesEntryModel](definitions.md#publishednodesentrymodel)|
##### Responses
@@ -593,7 +640,7 @@ UnpublishNodes method enables a client to remove nodes from a previously configu
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request payload specifying the nodes to unpublish.|[PublishedNodesEntryModel](definitions.md#publishednodesentrymodel)|
+|**Body**|**body**
*required*|The request payload specifying the nodes to unpublish.|[PublishedNodesEntryModel](definitions.md#publishednodesentrymodel)|
##### Responses
@@ -634,7 +681,7 @@ Unpublish all specified nodes or all nodes in the publisher configuration. Furth
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request contains the parts of the configuration to remove.|[PublishedNodesEntryModel](definitions.md#publishednodesentrymodel)|
+|**Body**|**body**
*required*|The request contains the parts of the configuration to remove.|[PublishedNodesEntryModel](definitions.md#publishednodesentrymodel)|
##### Responses
@@ -675,7 +722,7 @@ Start publishing values from a node on a server. The group field in the Connecti
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The server and node to publish.|[PublishStartRequestModelRequestEnvelope](definitions.md#publishstartrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The server and node to publish.|[PublishStartRequestModelRequestEnvelope](definitions.md#publishstartrequestmodelrequestenvelope)|
##### Responses
@@ -716,7 +763,7 @@ Stop publishing values from a node on the specified server. The group field that
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The node to stop publishing|[PublishStopRequestModelRequestEnvelope](definitions.md#publishstoprequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The node to stop publishing|[PublishStopRequestModelRequestEnvelope](definitions.md#publishstoprequestmodelrequestenvelope)|
##### Responses
@@ -766,7 +813,7 @@ Start network discovery using the provided discovery request configuration. The
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The discovery configuration to use during the discovery run.|[DiscoveryRequestModel](definitions.md#discoveryrequestmodel)|
+|**Body**|**body**
*required*|The discovery configuration to use during the discovery run.|[DiscoveryRequestModel](definitions.md#discoveryrequestmodel)|
##### Responses
@@ -807,7 +854,7 @@ Cancel a discovery run that is ongoing using the discovery request token specifi
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The information needed to cancel the discovery operation.|[DiscoveryCancelRequestModel](definitions.md#discoverycancelrequestmodel)|
+|**Body**|**body**
*required*|The information needed to cancel the discovery operation.|[DiscoveryCancelRequestModel](definitions.md#discoverycancelrequestmodel)|
##### Responses
@@ -848,7 +895,7 @@ Find servers matching the specified endpoint query spec.
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The endpoint query specifying the matching criteria for the discovered endpoints.|[ServerEndpointQueryModel](definitions.md#serverendpointquerymodel)|
+|**Body**|**body**
*required*|The endpoint query specifying the matching criteria for the discovered endpoints.|[ServerEndpointQueryModel](definitions.md#serverendpointquerymodel)|
##### Responses
@@ -889,7 +936,7 @@ Start server registration. The results of the registration are published as even
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|Contains all information to perform the registration request including discovery url to use.|[ServerRegistrationRequestModel](definitions.md#serverregistrationrequestmodel)|
+|**Body**|**body**
*required*|Contains all information to perform the registration request including discovery url to use.|[ServerRegistrationRequestModel](definitions.md#serverregistrationrequestmodel)|
##### Responses
@@ -943,7 +990,7 @@ Recursively browse a node to discover its references and nodes. The results are
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[BrowseStreamRequestModelRequestEnvelope](definitions.md#browsestreamrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[BrowseStreamRequestModelRequestEnvelope](definitions.md#browsestreamrequestmodelrequestenvelope)|
##### Responses
@@ -984,7 +1031,7 @@ Browse a a node to discover its references. For more information consult *optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[BrowseFirstRequestModelRequestEnvelope](definitions.md#browsefirstrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[BrowseFirstRequestModelRequestEnvelope](definitions.md#browsefirstrequestmodelrequestenvelope)|
##### Responses
@@ -1025,7 +1072,7 @@ Browse next
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[BrowseNextRequestModelRequestEnvelope](definitions.md#browsenextrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[BrowseNextRequestModelRequestEnvelope](definitions.md#browsenextrequestmodelrequestenvelope)|
##### Responses
@@ -1066,7 +1113,7 @@ Translate a start node and browse path into 0 or more target nodes. Allows progr
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[BrowsePathRequestModelRequestEnvelope](definitions.md#browsepathrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[BrowsePathRequestModelRequestEnvelope](definitions.md#browsepathrequestmodelrequestenvelope)|
##### Responses
@@ -1107,7 +1154,7 @@ Call a method on the OPC UA server endpoint with the specified input arguments a
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[MethodCallRequestModelRequestEnvelope](definitions.md#methodcallrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[MethodCallRequestModelRequestEnvelope](definitions.md#methodcallrequestmodelrequestenvelope)|
##### Responses
@@ -1148,7 +1195,7 @@ Get the metadata for calling the method. This API is obsolete. Use the more powe
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[MethodMetadataRequestModelRequestEnvelope](definitions.md#methodmetadatarequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[MethodMetadataRequestModelRequestEnvelope](definitions.md#methodmetadatarequestmodelrequestenvelope)|
##### Responses
@@ -1189,7 +1236,7 @@ Get the capabilities of the server. The server capabilities are exposed as a pro
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[RequestHeaderModelRequestEnvelope](definitions.md#requestheadermodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[RequestHeaderModelRequestEnvelope](definitions.md#requestheadermodelrequestenvelope)|
##### Responses
@@ -1230,7 +1277,7 @@ Get a server endpoint's certificate and certificate chain if available.
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The server endpoint to get the certificate for.|[EndpointModel](definitions.md#endpointmodel)|
+|**Body**|**body**
*required*|The server endpoint to get the certificate for.|[EndpointModel](definitions.md#endpointmodel)|
##### Responses
@@ -1271,7 +1318,7 @@ Connect to a server using the provided connection request information. The conne
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[ConnectRequestModelRequestEnvelope](definitions.md#connectrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[ConnectRequestModelRequestEnvelope](definitions.md#connectrequestmodelrequestenvelope)|
##### Responses
@@ -1312,7 +1359,7 @@ Can be used to disconnect a previously established connection.
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[DisconnectRequestModelRequestEnvelope](definitions.md#disconnectrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[DisconnectRequestModelRequestEnvelope](definitions.md#disconnectrequestmodelrequestenvelope)|
##### Responses
@@ -1345,7 +1392,7 @@ Get the historian capabilities exposed as part of the OPC UA server server objec
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[RequestHeaderModelRequestEnvelope](definitions.md#requestheadermodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[RequestHeaderModelRequestEnvelope](definitions.md#requestheadermodelrequestenvelope)|
##### Responses
@@ -1386,7 +1433,7 @@ Get the historian configuration of a historizing node in the OPC UA server
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[HistoryConfigurationRequestModelRequestEnvelope](definitions.md#historyconfigurationrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[HistoryConfigurationRequestModelRequestEnvelope](definitions.md#historyconfigurationrequestmodelrequestenvelope)|
##### Responses
@@ -1427,7 +1474,7 @@ Read the history using the respective OPC UA service call. See *optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[HistoryReadNextRequestModelRequestEnvelope](definitions.md#historyreadnextrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[HistoryReadNextRequestModelRequestEnvelope](definitions.md#historyreadnextrequestmodelrequestenvelope)|
##### Responses
@@ -1509,7 +1556,7 @@ Update history using the respective OPC UA service call. Consult the *optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[ReadRequestModelRequestEnvelope](definitions.md#readrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[ReadRequestModelRequestEnvelope](definitions.md#readrequestmodelrequestenvelope)|
##### Responses
@@ -1714,7 +1761,7 @@ Test connection to an opc ua server. The call will not establish any persistent
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[TestConnectionRequestModelRequestEnvelope](definitions.md#testconnectionrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[TestConnectionRequestModelRequestEnvelope](definitions.md#testconnectionrequestmodelrequestenvelope)|
##### Responses
@@ -1755,7 +1802,7 @@ Write the value of a variable node. This uses the service detailed in *optional*|The request payload and connection information identifying the server to connect to perform the operation on.|[WriteRequestModelRequestEnvelope](definitions.md#writerequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The request payload and connection information identifying the server to connect to perform the operation on.|[WriteRequestModelRequestEnvelope](definitions.md#writerequestmodelrequestenvelope)|
##### Responses
@@ -1850,7 +1897,7 @@ Delete event entries in a timeseries of the server historian. See *optional*|The events to insert into the timeseries.|[UpdateEventsDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#updateeventsdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The events to insert into the timeseries.|[UpdateEventsDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#updateeventsdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
##### Responses
@@ -1932,7 +1979,7 @@ Read an entire event timeseries from an OPC UA server historian as stream. See <
|Type|Name|Description|Schema|
|---|---|---|---|
-|**Body**|**body**
*optional*|The events to read in the timeseries.|[ReadEventsDetailsModelHistoryReadRequestModelRequestEnvelope](definitions.md#readeventsdetailsmodelhistoryreadrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The events to read in the timeseries.|[ReadEventsDetailsModelHistoryReadRequestModelRequestEnvelope](definitions.md#readeventsdetailsmodelhistoryreadrequestmodelrequestenvelope)|
##### Responses
@@ -1973,7 +2020,7 @@ Read an event timeseries inside the OPC UA server historian. See *optional*|The events to upsert into the timeseries.|[UpdateEventsDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#updateeventsdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The events to upsert into the timeseries.|[UpdateEventsDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#updateeventsdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
##### Responses
@@ -2137,7 +2184,7 @@ Delete value change entries in a timeseries of the server historian. See *optional*|The values to delete in the timeseries.|[DeleteValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#deletevaluesdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The values to delete in the timeseries.|[DeleteValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#deletevaluesdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
##### Responses
@@ -2178,7 +2225,7 @@ Delete value change entries in a timeseries of the server historian. See *optional*|The values to delete in the timeseries.|[DeleteValuesAtTimesDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#deletevaluesattimesdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The values to delete in the timeseries.|[DeleteValuesAtTimesDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#deletevaluesattimesdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
##### Responses
@@ -2219,7 +2266,7 @@ Delete value change entries in a timeseries of the server historian. See *optional*|The values to delete in the timeseries.|[DeleteValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#deletevaluesdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The values to delete in the timeseries.|[DeleteValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#deletevaluesdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
##### Responses
@@ -2260,7 +2307,7 @@ Insert value change entries in a timeseries of the server historian. See *optional*|The values to insert into the timeseries.|[UpdateValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#updatevaluesdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The values to insert into the timeseries.|[UpdateValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#updatevaluesdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
##### Responses
@@ -2301,7 +2348,7 @@ Read an entire timeseries from an OPC UA server historian as stream. See *optional*|The values to read in the timeseries.|[ReadValuesDetailsModelHistoryReadRequestModelRequestEnvelope](definitions.md#readvaluesdetailsmodelhistoryreadrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The values to read in the timeseries.|[ReadValuesDetailsModelHistoryReadRequestModelRequestEnvelope](definitions.md#readvaluesdetailsmodelhistoryreadrequestmodelrequestenvelope)|
##### Responses
@@ -2342,7 +2389,7 @@ Read specific timeseries data from an OPC UA server historian as stream. See *optional*|The values to read in the timeseries.|[ReadValuesAtTimesDetailsModelHistoryReadRequestModelRequestEnvelope](definitions.md#readvaluesattimesdetailsmodelhistoryreadrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The values to read in the timeseries.|[ReadValuesAtTimesDetailsModelHistoryReadRequestModelRequestEnvelope](definitions.md#readvaluesattimesdetailsmodelhistoryreadrequestmodelrequestenvelope)|
##### Responses
@@ -2383,7 +2430,7 @@ Read a data change timeseries inside the OPC UA server historian. See *optional*|The values to read in the timeseries.|[ReadValuesAtTimesDetailsModelHistoryReadRequestModelRequestEnvelope](definitions.md#readvaluesattimesdetailsmodelhistoryreadrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The values to read in the timeseries.|[ReadValuesAtTimesDetailsModelHistoryReadRequestModelRequestEnvelope](definitions.md#readvaluesattimesdetailsmodelhistoryreadrequestmodelrequestenvelope)|
##### Responses
@@ -2465,7 +2512,7 @@ Read modified changes in a timeseries inside the OPC UA server historian. See *optional*|The values to read in the timeseries.|[ReadModifiedValuesDetailsModelHistoryReadRequestModelRequestEnvelope](definitions.md#readmodifiedvaluesdetailsmodelhistoryreadrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The values to read in the timeseries.|[ReadModifiedValuesDetailsModelHistoryReadRequestModelRequestEnvelope](definitions.md#readmodifiedvaluesdetailsmodelhistoryreadrequestmodelrequestenvelope)|
##### Responses
@@ -2506,7 +2553,7 @@ Read processed timeseries data inside the OPC UA server historian. See *optional*|The continuation token from a previous read operation.|[HistoryReadNextRequestModelRequestEnvelope](definitions.md#historyreadnextrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The continuation token from a previous read operation.|[HistoryReadNextRequestModelRequestEnvelope](definitions.md#historyreadnextrequestmodelrequestenvelope)|
##### Responses
@@ -2629,7 +2676,7 @@ Read processed timeseries data from an OPC UA server historian as stream. See *optional*|The values to read in the timeseries.|[ReadProcessedValuesDetailsModelHistoryReadRequestModelRequestEnvelope](definitions.md#readprocessedvaluesdetailsmodelhistoryreadrequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The values to read in the timeseries.|[ReadProcessedValuesDetailsModelHistoryReadRequestModelRequestEnvelope](definitions.md#readprocessedvaluesdetailsmodelhistoryreadrequestmodelrequestenvelope)|
##### Responses
@@ -2670,7 +2717,7 @@ Replace value change entries in a timeseries of the server historian. See *optional*|The values to replace with in the timeseries.|[UpdateValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#updatevaluesdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The values to replace with in the timeseries.|[UpdateValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#updatevaluesdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
##### Responses
@@ -2711,7 +2758,7 @@ Upsert value change entries in a timeseries of the server historian. See *optional*|The values to upsert into the timeseries.|[UpdateValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#updatevaluesdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
+|**Body**|**body**
*required*|The values to upsert into the timeseries.|[UpdateValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope](definitions.md#updatevaluesdetailsmodelhistoryupdaterequestmodelrequestenvelope)|
##### Responses
diff --git a/docs/opc-publisher/definitions.md b/docs/opc-publisher/definitions.md
index 0327a8acad..a507266b15 100644
--- a/docs/opc-publisher/definitions.md
+++ b/docs/opc-publisher/definitions.md
@@ -1285,7 +1285,7 @@ Constants defined for the ValueRank attribute.
### OpcAuthenticationMode
Enum that defines the authentication method
-*Type* : enum (Anonymous, UsernamePassword)
+*Type* : enum (Anonymous, UsernamePassword, Certificate)
@@ -1593,6 +1593,7 @@ Contains the nodes which should be published
|**UseReverseConnect**
*optional*|Use reverse connect to connect ot the endpoint|boolean|
|**UseSecurity**
*optional*|Secure transport should be used to connect to
the opc server.|boolean|
|**Version**
*optional*|Version number of the entry|integer (int32)|
+|**WriterGroupQualityOfService**
*optional*||[QoS](definitions.md#qos)|
|**WriterGroupTransport**
*optional*||[WriterGroupTransport](definitions.md#writergrouptransport)|
@@ -1603,6 +1604,11 @@ PublishNodes direct method response
*Type* : object
+
+### QoS
+*Type* : enum (AtMostOnce, AtLeastOnce, ExactlyOnce)
+
+
### QueryCompilationRequestModel
Query compiler request model
@@ -2361,7 +2367,7 @@ Certificate chain
|Name|Description|Schema|
|---|---|---|
|**chain**
*optional*|Chain|< [X509CertificateModel](definitions.md#x509certificatemodel) > array|
-|**status**
*optional*|Chain validation status if validated|enum (NoError, NotTimeValid, Revoked, NotSignatureValid, NotValidForUsage, UntrustedRoot, RevocationStatusUnknown, Cyclic, InvalidExtension, InvalidPolicyConstraints, InvalidBasicConstraints, InvalidNameConstraints, HasNotSupportedNameConstraint, HasNotDefinedNameConstraint, HasNotPermittedNameConstraint, HasExcludedNameConstraint, PartialChain, CtlNotTimeValid, CtlNotSignatureValid, CtlNotValidForUsage, HasWeakSignature, OfflineRevocation, NoIssuanceChainPolicy, ExplicitDistrust, HasNotSupportedCriticalExtension)|
+|**status**
*optional*|Chain validation status if validated|enum (NotTimeValid, Revoked, NotSignatureValid, NotValidForUsage, UntrustedRoot, RevocationStatusUnknown, Cyclic, InvalidExtension, InvalidPolicyConstraints, InvalidBasicConstraints, InvalidNameConstraints, HasNotSupportedNameConstraint, HasNotDefinedNameConstraint, HasNotPermittedNameConstraint, HasExcludedNameConstraint, PartialChain, CtlNotTimeValid, CtlNotSignatureValid, CtlNotValidForUsage, HasWeakSignature, OfflineRevocation, NoIssuanceChainPolicy, ExplicitDistrust, HasNotSupportedCriticalExtension)|
@@ -2385,7 +2391,7 @@ Certificate model
### X509ChainStatus
Status of x509 chain
-*Type* : enum (NoError, NotTimeValid, Revoked, NotSignatureValid, NotValidForUsage, UntrustedRoot, RevocationStatusUnknown, Cyclic, InvalidExtension, InvalidPolicyConstraints, InvalidBasicConstraints, InvalidNameConstraints, HasNotSupportedNameConstraint, HasNotDefinedNameConstraint, HasNotPermittedNameConstraint, HasExcludedNameConstraint, PartialChain, CtlNotTimeValid, CtlNotSignatureValid, CtlNotValidForUsage, HasWeakSignature, OfflineRevocation, NoIssuanceChainPolicy, ExplicitDistrust, HasNotSupportedCriticalExtension)
+*Type* : enum (NotTimeValid, Revoked, NotSignatureValid, NotValidForUsage, UntrustedRoot, RevocationStatusUnknown, Cyclic, InvalidExtension, InvalidPolicyConstraints, InvalidBasicConstraints, InvalidNameConstraints, HasNotSupportedNameConstraint, HasNotDefinedNameConstraint, HasNotPermittedNameConstraint, HasExcludedNameConstraint, PartialChain, CtlNotTimeValid, CtlNotSignatureValid, CtlNotValidForUsage, HasWeakSignature, OfflineRevocation, NoIssuanceChainPolicy, ExplicitDistrust, HasNotSupportedCriticalExtension)
diff --git a/docs/opc-publisher/openapi.json b/docs/opc-publisher/openapi.json
index fb9e6c97b9..cbd9b5e426 100644
--- a/docs/opc-publisher/openapi.json
+++ b/docs/opc-publisher/openapi.json
@@ -24,7 +24,7 @@
"Certificates"
],
"summary": "ListCertificates",
- "description": "Get the certificates in the specified certificated store",
+ "description": "Get the certificates in the specified certificate store",
"operationId": "ListCertificates",
"produces": [
"text/plain",
@@ -74,6 +74,12 @@
"summary": "AddCertificate",
"description": "Add a certificate to the specified store. The certificate is provided as a pfx/pkcs12 optionally password protected blob.",
"operationId": "AddCertificate",
+ "consumes": [
+ "application/json",
+ "text/json",
+ "application/*+json",
+ "application/x-msgpack"
+ ],
"parameters": [
{
"in": "path",
@@ -99,8 +105,18 @@
{
"in": "query",
"name": "password",
- "description": "The optional password of the blob",
+ "description": "The optional password of the pfx",
"type": "string"
+ },
+ {
+ "in": "body",
+ "name": "body",
+ "description": "The pfx encoded certificate.",
+ "required": true,
+ "schema": {
+ "format": "byte",
+ "type": "string"
+ }
}
],
"responses": {
@@ -167,6 +183,12 @@
"summary": "AddCertificateRevocationList",
"description": "Add a certificate revocation list to the specified store. The certificate revocation list is provided as a der encoded blob.",
"operationId": "AddCertificateRevocationList",
+ "consumes": [
+ "application/json",
+ "text/json",
+ "application/*+json",
+ "application/x-msgpack"
+ ],
"parameters": [
{
"in": "path",
@@ -188,6 +210,16 @@
"name": "CertificateStoreName",
"modelAsString": false
}
+ },
+ {
+ "in": "body",
+ "name": "body",
+ "description": "The pfx encoded certificate.",
+ "required": true,
+ "schema": {
+ "format": "byte",
+ "type": "string"
+ }
}
],
"responses": {
@@ -241,6 +273,24 @@
"summary": "AddCertificateChain",
"description": "Add a certificate chain to the specified store. The certificate is provided as a concatenated asn encoded set of certificates with the first the one to add, and the remainder the issuer chain.",
"operationId": "AddCertificateChain",
+ "consumes": [
+ "application/json",
+ "text/json",
+ "application/*+json",
+ "application/x-msgpack"
+ ],
+ "parameters": [
+ {
+ "in": "body",
+ "name": "body",
+ "description": "The certificate chain.",
+ "required": true,
+ "schema": {
+ "format": "byte",
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "Success"
@@ -280,6 +330,24 @@
"summary": "AddTrustedHttpsCertificateAsync",
"description": "Add a certificate chain to the trusted https store. The certificate is provided as a concatenated set of certificates with the first the one to add, and the remainder the issuer chain.",
"operationId": "AddTrustedHttpsCertificate",
+ "consumes": [
+ "application/json",
+ "text/json",
+ "application/*+json",
+ "application/x-msgpack"
+ ],
+ "parameters": [
+ {
+ "in": "body",
+ "name": "body",
+ "description": "The certificate chain.",
+ "required": true,
+ "schema": {
+ "format": "byte",
+ "type": "string"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "Success"
@@ -395,6 +463,7 @@
"in": "body",
"name": "body",
"description": "The server and node to publish.",
+ "required": true,
"schema": {
"$ref": "#/definitions/PublishStartRequestModelRequestEnvelope"
}
@@ -435,6 +504,7 @@
"in": "body",
"name": "body",
"description": "The node to stop publishing",
+ "required": true,
"schema": {
"$ref": "#/definitions/PublishStopRequestModelRequestEnvelope"
}
@@ -475,6 +545,7 @@
"in": "body",
"name": "body",
"description": "The nodes to publish or unpublish.",
+ "required": true,
"schema": {
"$ref": "#/definitions/PublishBulkRequestModelRequestEnvelope"
}
@@ -515,6 +586,7 @@
"in": "body",
"name": "body",
"description": "",
+ "required": true,
"schema": {
"$ref": "#/definitions/PublishedItemListRequestModelRequestEnvelope"
}
@@ -555,6 +627,7 @@
"in": "body",
"name": "body",
"description": "The request contains the nodes to publish.",
+ "required": true,
"schema": {
"$ref": "#/definitions/PublishedNodesEntryModel"
}
@@ -595,6 +668,7 @@
"in": "body",
"name": "body",
"description": "The request payload specifying the nodes to unpublish.",
+ "required": true,
"schema": {
"$ref": "#/definitions/PublishedNodesEntryModel"
}
@@ -635,6 +709,7 @@
"in": "body",
"name": "body",
"description": "The request contains the parts of the configuration to remove.",
+ "required": true,
"schema": {
"$ref": "#/definitions/PublishedNodesEntryModel"
}
@@ -661,8 +736,7 @@
"consumes": [
"application/json",
"text/json",
- "application/*+json",
- "application/x-msgpack"
+ "application/*+json"
],
"produces": [
"text/plain",
@@ -675,6 +749,7 @@
"in": "body",
"name": "body",
"description": "The parts of the configuration to add or update.",
+ "required": true,
"schema": {
"type": "array",
"items": {
@@ -740,6 +815,7 @@
"in": "body",
"name": "body",
"description": "The new published nodes configuration",
+ "required": true,
"schema": {
"$ref": "#/definitions/SetConfiguredEndpointsRequestModel"
}
@@ -777,6 +853,7 @@
"in": "body",
"name": "body",
"description": "The entry model from a call to GetConfiguredEndpoints for which to gather the nodes.",
+ "required": true,
"schema": {
"$ref": "#/definitions/PublishedNodesEntryModel"
}
@@ -844,6 +921,7 @@
"in": "body",
"name": "body",
"description": "The endpoint query specifying the matching criteria for the discovered endpoints.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ServerEndpointQueryModel"
}
@@ -884,6 +962,7 @@
"in": "body",
"name": "body",
"description": "Contains all information to perform the registration request including discovery url to use.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ServerRegistrationRequestModel"
}
@@ -924,6 +1003,7 @@
"in": "body",
"name": "body",
"description": "The discovery configuration to use during the discovery run.",
+ "required": true,
"schema": {
"$ref": "#/definitions/DiscoveryRequestModel"
}
@@ -964,6 +1044,7 @@
"in": "body",
"name": "body",
"description": "The information needed to cancel the discovery operation.",
+ "required": true,
"schema": {
"$ref": "#/definitions/DiscoveryCancelRequestModel"
}
@@ -1004,6 +1085,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/RequestHeaderModelRequestEnvelope"
}
@@ -1044,6 +1126,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/BrowseFirstRequestModelRequestEnvelope"
}
@@ -1084,6 +1167,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/BrowseNextRequestModelRequestEnvelope"
}
@@ -1124,6 +1208,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/BrowseStreamRequestModelRequestEnvelope"
}
@@ -1164,6 +1249,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/BrowsePathRequestModelRequestEnvelope"
}
@@ -1204,6 +1290,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ValueReadRequestModelRequestEnvelope"
}
@@ -1244,6 +1331,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ValueWriteRequestModelRequestEnvelope"
}
@@ -1284,6 +1372,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/NodeMetadataRequestModelRequestEnvelope"
}
@@ -1324,6 +1413,7 @@
"in": "body",
"name": "body",
"description": "The compilation request and connection information.",
+ "required": true,
"schema": {
"$ref": "#/definitions/QueryCompilationRequestModelRequestEnvelope"
}
@@ -1364,6 +1454,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/MethodMetadataRequestModelRequestEnvelope"
}
@@ -1404,6 +1495,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/MethodCallRequestModelRequestEnvelope"
}
@@ -1444,6 +1536,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ReadRequestModelRequestEnvelope"
}
@@ -1484,6 +1577,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/WriteRequestModelRequestEnvelope"
}
@@ -1524,6 +1618,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/VariantValueHistoryReadRequestModelRequestEnvelope"
}
@@ -1564,6 +1659,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/HistoryReadNextRequestModelRequestEnvelope"
}
@@ -1604,6 +1700,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/VariantValueHistoryUpdateRequestModelRequestEnvelope"
}
@@ -1644,6 +1741,7 @@
"in": "body",
"name": "body",
"description": "The server endpoint to get the certificate for.",
+ "required": true,
"schema": {
"$ref": "#/definitions/EndpointModel"
}
@@ -1684,6 +1782,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/RequestHeaderModelRequestEnvelope"
}
@@ -1724,6 +1823,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/HistoryConfigurationRequestModelRequestEnvelope"
}
@@ -1764,6 +1864,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ConnectRequestModelRequestEnvelope"
}
@@ -1804,6 +1905,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/TestConnectionRequestModelRequestEnvelope"
}
@@ -1838,6 +1940,7 @@
"in": "body",
"name": "body",
"description": "The request payload and connection information identifying the server to connect to perform the operation on.",
+ "required": true,
"schema": {
"$ref": "#/definitions/DisconnectRequestModelRequestEnvelope"
}
@@ -1875,6 +1978,7 @@
"in": "body",
"name": "body",
"description": "The events to replace with in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/UpdateEventsDetailsModelHistoryUpdateRequestModelRequestEnvelope"
}
@@ -1915,6 +2019,7 @@
"in": "body",
"name": "body",
"description": "The events to insert into the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/UpdateEventsDetailsModelHistoryUpdateRequestModelRequestEnvelope"
}
@@ -1955,6 +2060,7 @@
"in": "body",
"name": "body",
"description": "The events to upsert into the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/UpdateEventsDetailsModelHistoryUpdateRequestModelRequestEnvelope"
}
@@ -1995,6 +2101,7 @@
"in": "body",
"name": "body",
"description": "The events to delete in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/DeleteEventsDetailsModelHistoryUpdateRequestModelRequestEnvelope"
}
@@ -2035,6 +2142,7 @@
"in": "body",
"name": "body",
"description": "The values to delete in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/DeleteValuesAtTimesDetailsModelHistoryUpdateRequestModelRequestEnvelope"
}
@@ -2075,6 +2183,7 @@
"in": "body",
"name": "body",
"description": "The values to delete in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/DeleteValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope"
}
@@ -2115,6 +2224,7 @@
"in": "body",
"name": "body",
"description": "The values to delete in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/DeleteValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope"
}
@@ -2155,6 +2265,7 @@
"in": "body",
"name": "body",
"description": "The values to replace with in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/UpdateValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope"
}
@@ -2195,6 +2306,7 @@
"in": "body",
"name": "body",
"description": "The values to insert into the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/UpdateValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope"
}
@@ -2235,6 +2347,7 @@
"in": "body",
"name": "body",
"description": "The values to upsert into the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/UpdateValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope"
}
@@ -2275,6 +2388,7 @@
"in": "body",
"name": "body",
"description": "The events to read in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ReadEventsDetailsModelHistoryReadRequestModelRequestEnvelope"
}
@@ -2315,6 +2429,7 @@
"in": "body",
"name": "body",
"description": "The continuation from a previous read request.",
+ "required": true,
"schema": {
"$ref": "#/definitions/HistoryReadNextRequestModelRequestEnvelope"
}
@@ -2355,6 +2470,7 @@
"in": "body",
"name": "body",
"description": "The values to read in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ReadValuesDetailsModelHistoryReadRequestModelRequestEnvelope"
}
@@ -2395,6 +2511,7 @@
"in": "body",
"name": "body",
"description": "The values to read in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ReadValuesAtTimesDetailsModelHistoryReadRequestModelRequestEnvelope"
}
@@ -2435,6 +2552,7 @@
"in": "body",
"name": "body",
"description": "The values to read in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ReadProcessedValuesDetailsModelHistoryReadRequestModelRequestEnvelope"
}
@@ -2475,6 +2593,7 @@
"in": "body",
"name": "body",
"description": "The values to read in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ReadModifiedValuesDetailsModelHistoryReadRequestModelRequestEnvelope"
}
@@ -2515,6 +2634,7 @@
"in": "body",
"name": "body",
"description": "The continuation token from a previous read operation.",
+ "required": true,
"schema": {
"$ref": "#/definitions/HistoryReadNextRequestModelRequestEnvelope"
}
@@ -2555,6 +2675,7 @@
"in": "body",
"name": "body",
"description": "The values to read in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ReadValuesDetailsModelHistoryReadRequestModelRequestEnvelope"
}
@@ -2595,6 +2716,7 @@
"in": "body",
"name": "body",
"description": "The values to read in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ReadModifiedValuesDetailsModelHistoryReadRequestModelRequestEnvelope"
}
@@ -2635,6 +2757,7 @@
"in": "body",
"name": "body",
"description": "The values to read in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ReadValuesAtTimesDetailsModelHistoryReadRequestModelRequestEnvelope"
}
@@ -2675,6 +2798,7 @@
"in": "body",
"name": "body",
"description": "The values to read in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ReadProcessedValuesDetailsModelHistoryReadRequestModelRequestEnvelope"
}
@@ -2715,6 +2839,7 @@
"in": "body",
"name": "body",
"description": "The events to read in the timeseries.",
+ "required": true,
"schema": {
"$ref": "#/definitions/ReadEventsDetailsModelHistoryReadRequestModelRequestEnvelope"
}
@@ -5243,7 +5368,8 @@
"description": "Enum that defines the authentication method",
"enum": [
"Anonymous",
- "UsernamePassword"
+ "UsernamePassword",
+ "Certificate"
],
"type": "string",
"x-ms-enum": {
@@ -5975,6 +6101,9 @@
"description": "Use reverse connect to connect ot the endpoint",
"type": "boolean"
},
+ "WriterGroupQualityOfService": {
+ "$ref": "#/definitions/QoS"
+ },
"WriterGroupTransport": {
"$ref": "#/definitions/WriterGroupTransport"
},
@@ -6010,6 +6139,19 @@
"description": "PublishNodes direct method response",
"type": "object"
},
+ "QoS": {
+ "format": "int32",
+ "enum": [
+ "AtMostOnce",
+ "AtLeastOnce",
+ "ExactlyOnce"
+ ],
+ "type": "string",
+ "x-ms-enum": {
+ "name": "QoS",
+ "modelAsString": false
+ }
+ },
"QueryCompilationRequestModel": {
"description": "Query compiler request model",
"required": [
@@ -7326,7 +7468,6 @@
"status": {
"description": "Chain validation status if validated",
"enum": [
- "NoError",
"NotTimeValid",
"Revoked",
"NotSignatureValid",
@@ -7411,7 +7552,6 @@
"format": "int32",
"description": "Status of x509 chain",
"enum": [
- "NoError",
"NotTimeValid",
"Revoked",
"NotSignatureValid",
@@ -7466,4 +7606,4 @@
"description": "
\r\n This section lists all OPC UA HDA or Historian related API provided by\r\n OPC Publisher.\r\n \r\n
\r\n The method name for all transports other than HTTP (which uses the shown\r\n HTTP methods and resource uris) is the name of the subsection header.\r\n To use the version specific method append \"_V1\" or \"_V2\" to the method\r\n name.\r\n "
}
]
-}
\ No newline at end of file
+}
diff --git a/docs/opc-publisher/readme.md b/docs/opc-publisher/readme.md
index 88a2b058ca..5afefb2dc0 100644
--- a/docs/opc-publisher/readme.md
+++ b/docs/opc-publisher/readme.md
@@ -436,7 +436,7 @@ The configuration schema is used with the file based configuration, but also wit
}
```
-(*) To subscribe to OPC UA Alarms and Events you must configure the `EventFilter` attribute in `OpcNodes` as [described here](./readme.md).
+(*) To subscribe to OPC UA Alarms and Events you must configure the `EventFilter` attribute in `OpcNodes` as [described here](./readme.md#configuring-event-subscriptions).
Each [published nodes entry model](./definitions.md#publishednodesentrymodel) has the following attributes:
diff --git a/docs/release-announcement.md b/docs/release-announcement.md
index b7935c13d0..e1f7f70f04 100644
--- a/docs/release-announcement.md
+++ b/docs/release-announcement.md
@@ -2,6 +2,10 @@
## Table Of Contents
+- [Azure Industrial IoT OPC Publisher 2.9.3](#azure-industrial-iot-opc-publisher-293)
+ - [Breaking changes in 2.9.3](#breaking-changes-in-293)
+ - [New features in 2.9.3](#new-features-in-293)
+ - [Bug fixes in 2.9.3](#bug-fixes-in-293)
- [Azure Industrial IoT OPC Publisher 2.9.2](#azure-industrial-iot-opc-publisher-292)
- [Changes in 2.9.2](#changes-in-292)
- [Azure Industrial IoT OPC Publisher 2.9.1](#azure-industrial-iot-opc-publisher-291)
@@ -34,6 +38,47 @@
- [Azure Industrial IoT Platform Release 2.8.1](#azure-industrial-iot-platform-release-281)
- [Azure Industrial IoT Platform Release 2.8](#azure-industrial-iot-platform-release-28)
+## Azure Industrial IoT OPC Publisher 2.9.3
+
+We are pleased to announce the release of version 2.9.3 of OPC Publisher and the companion web api. This release moves OPC Publisher to .net 8 which is the latest LTS version of .net and comes with several new features, bug and security fixes. 2.9.3 is the latest supported release.
+
+### Breaking changes in 2.9.3
+
+> IMPORTANT. Please read when updating from previous versions of OPC Publisher
+
+- For security *all containers are now running rootless*. This means OPC Publisher must be deployed to use the required CAPS or run under root to access the host file system. To do so you can use the `"User" : "root"` setting in the `CreateOptions`. The sample deployment manifest has been updated accordingly. (#2114)
+- All container images published now use Mariner Linux (distroless) base images instead of Alpine.
+- Metadata collection has shown to be very taxing on OPC UA servers. When 2.9 was dropped in to replace 2.8 in production, memory consumption was too large and connections would drop. OPC Publisher now defaults to `--dm=true` in 2.9.3 to disable metadata messages to be compatible with 2.8 when `--strict` / `-c` is not specified. If you need meta data messages but do not use strict mode (not recommended) you must explicitly enable it using `--dm=false`.
+
+### New features in 2.9.3
+
+- New configuration option to specify quality of service. This allows setting QOS0 as alternative to QOS1 (#2085)
+- Diagnostic info can now also be periodically published to a topic or IoT Edge output name using new `--dtt` diagnostics topic template. (#2068)
+- New Module to module method to get REST endpoint info and API key so that other modules can access the REST API (#2096)
+- Fixed Publisher HTTPS API returning SSL_ERROR_SYSCALL error. Now a self signed certificate is the fallback if workload api cannot produce a certificate with private key (#2101)
+- Restart announcement now includes additional information, including version, timestamp of (re-)start, module and device ids.
+- X509 User Authentication support using secrets reference feature request (#2005)
+- New API to manage the PKI infrastructure of the OPC Publisher (certificate stores). You can now list, add and remove certificates from the OPC UA certificate stores remotely. (#1996)
+- You can now configure OPC Publisher to re-use a session across writer groups with the same endpoint url and security settings. (#2065)
+- Added samples to show how to call OPC Publisher API over MQTT, HTTP and IoT Hub.
+
+### Bug fixes in 2.9.3
+
+- 2.8 Start instrument was missing on 2.9 prometheus endpoint (#2110)
+- Harden when OPC UA server sometimes reports monitored items samples changes unordered in subscription notification and thus samples messages are also unordered (#2108)
+- Need to have timestamp information and other information in runtime state reporting message, need to have a special routing path for runtime state messages feature request. Restart announcement now includes additional information, including version, timestamp of (re-)start, module and device ids. (#2111)
+- Optimize metadata collection, do not collect metadata from servers for built in types (#2105)
+- Fix that it was not possible to configure event subscriptions for multiple events on the same node id (#2098)
+- Fix complex type encoding where Json message encoding has value in Binary encoding for complex (multilevel structure) (#2090)
+- Dapr now works without requiring state component. Dapr now runs over http instead of https by default. New option to select the url scheme (#2102, #2119, #2117, #2109
+- It is now possible to disable retrying subscription re-creation by configuring a value of 0. (#2100)
+- Fix that extension field values show up wrong in samples mode. (#2092)
+- FIx Event subscription using the REST Api fails with: "The request field is required." (#2078)
+- The configuration of the OpcPublisher 2.9.2 fails using the REST Api bug (#2066)
+- For each configured in pn.json Dataset publisher must try to reuse an existing session for this EndpointUrl with the identical security settings (if exists). feature request
+- Address issues deploying the web api, e.g., getting error when trying to use option 2 to deploy Azure IIoT Deployment and ./aad-register.ps1 errors with "A parameter cannot be found that matches the parameter name 'ReplyUrl'." (#2063, #2064)
+- Update documentation, including breaking changes, Add Azure Storage, Azure Key Vault services, and Application Insights to arch diagram, how to setup the OPCPublisher edge module with X.509 certificates documentation, and how to emit ExtensionFields in Pub sub mode using key frame counter. (#1917, #2091, #2083)
+
## Azure Industrial IoT OPC Publisher 2.9.2
We are pleased to announce the release of version 2.9.2 of OPC Publisher. This release comes with several bug and security fixes and is the latest supported release.
diff --git a/docs/web-api/definitions.md b/docs/web-api/definitions.md
index 4e0722b0da..77a980a65c 100644
--- a/docs/web-api/definitions.md
+++ b/docs/web-api/definitions.md
@@ -798,6 +798,13 @@ Gateway registration update request
|**siteId**
*optional*|Site of the Gateway|string|
+
+### HeartbeatBehavior
+Heartbeat behavior
+
+*Type* : enum (WatchdogLKV, WatchdogLKG, PeriodicLKV, PeriodicLKG, WatchdogLKVWithUpdatedTimestamps)
+
+
### HistoricEventModel
Historic event
@@ -1272,7 +1279,7 @@ Constants defined for the ValueRank attribute.
### OpcAuthenticationMode
Enum that defines the authentication method
-*Type* : enum (Anonymous, UsernamePassword)
+*Type* : enum (Anonymous, UsernamePassword, Certificate)
@@ -1295,6 +1302,7 @@ Describing an entry in the node list
|**EventFilter**
*optional*||[EventFilterModel](definitions.md#eventfiltermodel)|
|**ExpandedNodeId**
*optional*|Expanded Node identifier (same as Azure.IIoT.OpcUa.Publisher.Models.OpcNodeModel.Id)|string|
|**FetchDisplayName**
*optional*|Fetch display name from the node|boolean|
+|**HeartbeatBehavior**
*optional*||[HeartbeatBehavior](definitions.md#heartbeatbehavior)|
|**HeartbeatInterval**
*optional*|Heartbeat interval in seconds|integer (int32)|
|**HeartbeatIntervalTimespan**
*optional*|Heartbeat interval as TimeSpan.|string (date-span)|
|**Id**
*optional*|Node Identifier|string|
@@ -1461,6 +1469,7 @@ Contains the nodes which should be published
|**BatchTriggerIntervalTimespan**
*optional*|Send network messages at the specified publishing
interval.
Takes precedence over Azure.IIoT.OpcUa.Publisher.Models.PublishedNodesEntryModel.BatchTriggerInterval
if defined.|string (date-span)|
|**DataSetClassId**
*optional*|A dataset class id.|string (uuid)|
|**DataSetDescription**
*optional*|The optional description of the dataset.|string|
+|**DataSetExtensionFields**
*optional*|Optional field and value pairs to insert into the
data sets emitted by data set writer.|object|
|**DataSetKeyFrameCount**
*optional*|Insert a key frame every x messages|integer (int64)|
|**DataSetName**
*optional*|The optional short name of the dataset.|string|
|**DataSetPublishingInterval**
*optional*|The Publishing interval for a dataset writer
in miliseconds.|integer (int32)|
@@ -1469,6 +1478,8 @@ Contains the nodes which should be published
|**DataSetWriterId**
*optional*|Name of the data set writer.|string|
|**EncryptedAuthPassword**
*optional*|encrypted password|string|
|**EncryptedAuthUsername**
*optional*|encrypted username|string|
+|**EndpointSecurityMode**
*optional*||[SecurityMode](definitions.md#securitymode)|
+|**EndpointSecurityPolicy**
*optional*|The specific security policy to use for the specified
endpoint. Overrides Azure.IIoT.OpcUa.Publisher.Models.PublishedNodesEntryModel.UseSecurity setting.
If the security policy is not available with the
specified security mode connectivity will fail.|string|
|**EndpointUrl**
*required*|The endpoint URL of the OPC UA server.
**Minimum length** : `1`|string|
|**LastChangeTimespan**
*optional*|Last change to the entry|string (date-time)|
|**MaxKeepAliveCount**
*optional*|When the publishing timer has expired this number of
times without requiring any Notification to be sent,
to the writer a keep-alive message is sent.|integer (int64)|
@@ -1483,8 +1494,10 @@ Contains the nodes which should be published
|**OpcNodes**
*optional*|Nodes defined in the collection.|< [OpcNodeModel](definitions.md#opcnodemodel) > array|
|**Priority**
*optional*|Priority of the writer subscription.|integer (int32)|
|**SendKeepAliveDataSetMessages**
*optional*|Send a keep alive message when a subscription keep
alive notification is received inside the writer. If keep
alive messages are not supported by the messaging
profile chosen this value is ignored.|boolean|
+|**UseReverseConnect**
*optional*|Use reverse connect to connect ot the endpoint|boolean|
|**UseSecurity**
*optional*|Secure transport should be used to connect to
the opc server.|boolean|
|**Version**
*optional*|Version number of the entry|integer (int32)|
+|**WriterGroupQualityOfService**
*optional*||[QoS](definitions.md#qos)|
|**WriterGroupTransport**
*optional*||[WriterGroupTransport](definitions.md#writergrouptransport)|
@@ -1541,6 +1554,11 @@ Publisher registration update request
|**siteId**
*optional*|Site of the publisher|string|
+
+### QoS
+*Type* : enum (AtMostOnce, AtLeastOnce, ExactlyOnce)
+
+
### ReadEventsDetailsModel
Read event data
@@ -2109,7 +2127,7 @@ Certificate chain
|Name|Description|Schema|
|---|---|---|
|**chain**
*optional*|Chain|< [X509CertificateModel](definitions.md#x509certificatemodel) > array|
-|**status**
*optional*|Chain validation status if validated|enum (NoError, NotTimeValid, Revoked, NotSignatureValid, NotValidForUsage, UntrustedRoot, RevocationStatusUnknown, Cyclic, InvalidExtension, InvalidPolicyConstraints, InvalidBasicConstraints, InvalidNameConstraints, HasNotSupportedNameConstraint, HasNotDefinedNameConstraint, HasNotPermittedNameConstraint, HasExcludedNameConstraint, PartialChain, CtlNotTimeValid, CtlNotSignatureValid, CtlNotValidForUsage, HasWeakSignature, OfflineRevocation, NoIssuanceChainPolicy, ExplicitDistrust, HasNotSupportedCriticalExtension)|
+|**status**
*optional*|Chain validation status if validated|enum (NotTimeValid, Revoked, NotSignatureValid, NotValidForUsage, UntrustedRoot, RevocationStatusUnknown, Cyclic, InvalidExtension, InvalidPolicyConstraints, InvalidBasicConstraints, InvalidNameConstraints, HasNotSupportedNameConstraint, HasNotDefinedNameConstraint, HasNotPermittedNameConstraint, HasExcludedNameConstraint, PartialChain, CtlNotTimeValid, CtlNotSignatureValid, CtlNotValidForUsage, HasWeakSignature, OfflineRevocation, NoIssuanceChainPolicy, ExplicitDistrust, HasNotSupportedCriticalExtension)|
@@ -2119,9 +2137,10 @@ Certificate model
|Name|Description|Schema|
|---|---|---|
-|**certificate**
*optional*|Raw data|< integer (int32) > array|
+|**hasPrivateKey**
*optional*|Contains private key|boolean|
|**notAfterUtc**
*optional*|Not after validity|string (date-time)|
|**notBeforeUtc**
*optional*|Not before validity|string (date-time)|
+|**pfx**
*optional*|Certificate as Pkcs12|< integer (int32) > array|
|**selfSigned**
*optional*|Self signed certificate|boolean|
|**serialNumber**
*optional*|Serial number|string|
|**subject**
*optional*|Subject|string|
@@ -2132,7 +2151,7 @@ Certificate model
### X509ChainStatus
Status of x509 chain
-*Type* : enum (NoError, NotTimeValid, Revoked, NotSignatureValid, NotValidForUsage, UntrustedRoot, RevocationStatusUnknown, Cyclic, InvalidExtension, InvalidPolicyConstraints, InvalidBasicConstraints, InvalidNameConstraints, HasNotSupportedNameConstraint, HasNotDefinedNameConstraint, HasNotPermittedNameConstraint, HasExcludedNameConstraint, PartialChain, CtlNotTimeValid, CtlNotSignatureValid, CtlNotValidForUsage, HasWeakSignature, OfflineRevocation, NoIssuanceChainPolicy, ExplicitDistrust, HasNotSupportedCriticalExtension)
+*Type* : enum (NotTimeValid, Revoked, NotSignatureValid, NotValidForUsage, UntrustedRoot, RevocationStatusUnknown, Cyclic, InvalidExtension, InvalidPolicyConstraints, InvalidBasicConstraints, InvalidNameConstraints, HasNotSupportedNameConstraint, HasNotDefinedNameConstraint, HasNotPermittedNameConstraint, HasExcludedNameConstraint, PartialChain, CtlNotTimeValid, CtlNotSignatureValid, CtlNotValidForUsage, HasWeakSignature, OfflineRevocation, NoIssuanceChainPolicy, ExplicitDistrust, HasNotSupportedCriticalExtension)
diff --git a/docs/web-api/openapi.json b/docs/web-api/openapi.json
index 61efa399f5..d100392c95 100644
--- a/docs/web-api/openapi.json
+++ b/docs/web-api/openapi.json
@@ -5723,6 +5723,21 @@
}
}
},
+ "HeartbeatBehavior": {
+ "description": "Heartbeat behavior",
+ "enum": [
+ "WatchdogLKV",
+ "WatchdogLKG",
+ "PeriodicLKV",
+ "PeriodicLKG",
+ "WatchdogLKVWithUpdatedTimestamps"
+ ],
+ "type": "string",
+ "x-ms-enum": {
+ "name": "HeartbeatBehavior",
+ "modelAsString": false
+ }
+ },
"HistoricEventModel": {
"description": "Historic event",
"type": "object",
@@ -6773,7 +6788,8 @@
"description": "Enum that defines the authentication method",
"enum": [
"Anonymous",
- "UsernamePassword"
+ "UsernamePassword",
+ "Certificate"
],
"type": "string",
"x-ms-enum": {
@@ -6852,6 +6868,9 @@
"description": "Index range to read, default to null.",
"type": "string"
},
+ "HeartbeatBehavior": {
+ "$ref": "#/definitions/HeartbeatBehavior"
+ },
"HeartbeatInterval": {
"format": "int32",
"description": "Heartbeat interval in seconds",
@@ -7255,6 +7274,20 @@
"description": "Priority of the writer subscription.",
"type": "integer"
},
+ "DataSetExtensionFields": {
+ "description": "Optional field and value pairs to insert into the\r\ndata sets emitted by data set writer.",
+ "type": "object",
+ "additionalProperties": {
+ "description": "A variant which can be represented by any value including null."
+ }
+ },
+ "EndpointSecurityMode": {
+ "$ref": "#/definitions/SecurityMode"
+ },
+ "EndpointSecurityPolicy": {
+ "description": "The specific security policy to use for the specified\r\nendpoint. Overrides Azure.IIoT.OpcUa.Publisher.Models.PublishedNodesEntryModel.UseSecurity setting.\r\nIf the security policy is not available with the\r\nspecified security mode connectivity will fail.",
+ "type": "string"
+ },
"MessagingMode": {
"$ref": "#/definitions/MessagingMode"
},
@@ -7276,6 +7309,13 @@
"description": "Send network messages at the specified publishing\r\ninterval.\r\nTakes precedence over Azure.IIoT.OpcUa.Publisher.Models.PublishedNodesEntryModel.BatchTriggerInterval\r\nif defined.",
"type": "string"
},
+ "UseReverseConnect": {
+ "description": "Use reverse connect to connect ot the endpoint",
+ "type": "boolean"
+ },
+ "WriterGroupQualityOfService": {
+ "$ref": "#/definitions/QoS"
+ },
"WriterGroupTransport": {
"$ref": "#/definitions/WriterGroupTransport"
},
@@ -7389,6 +7429,18 @@
}
}
},
+ "QoS": {
+ "enum": [
+ "AtMostOnce",
+ "AtLeastOnce",
+ "ExactlyOnce"
+ ],
+ "type": "string",
+ "x-ms-enum": {
+ "name": "QoS",
+ "modelAsString": false
+ }
+ },
"ReadEventsDetailsModel": {
"description": "Read event data",
"type": "object",
@@ -8494,7 +8546,6 @@
"status": {
"description": "Chain validation status if validated",
"enum": [
- "NoError",
"NotTimeValid",
"Revoked",
"NotSignatureValid",
@@ -8561,20 +8612,23 @@
"description": "Self signed certificate",
"type": "boolean"
},
- "certificate": {
- "description": "Raw data",
+ "pfx": {
+ "description": "Certificate as Pkcs12",
"type": "array",
"items": {
"format": "int32",
"type": "integer"
}
+ },
+ "hasPrivateKey": {
+ "description": "Contains private key",
+ "type": "boolean"
}
}
},
"X509ChainStatus": {
"description": "Status of x509 chain",
"enum": [
- "NoError",
"NotTimeValid",
"Revoked",
"NotSignatureValid",
diff --git a/samples/Http/BrowseAll/BrowseAll.cs b/samples/Http/BrowseAll/BrowseAll.cs
index b2fa00c486..2e94ed8036 100644
--- a/samples/Http/BrowseAll/BrowseAll.cs
+++ b/samples/Http/BrowseAll/BrowseAll.cs
@@ -34,6 +34,6 @@
response.EnsureSuccessStatusCode();
await foreach (var result in JsonSerializer.DeserializeAsyncEnumerable(response.Content.ReadAsStream(), cancellationToken: cts.Token)!)
{
- var browseElementJson = JsonSerializer.Serialize(result, new JsonSerializerOptions { WriteIndented = true });
+ var browseElementJson = JsonSerializer.Serialize(result, Parameters.Indented);
Console.WriteLine(browseElementJson);
}
diff --git a/samples/Http/GetConfiguration/GetConfiguration.cs b/samples/Http/GetConfiguration/GetConfiguration.cs
index 13a244a92f..60a28407ec 100644
--- a/samples/Http/GetConfiguration/GetConfiguration.cs
+++ b/samples/Http/GetConfiguration/GetConfiguration.cs
@@ -20,12 +20,12 @@
var endpoints = configuration.GetProperty("endpoints").EnumerateArray();
foreach (var endpoint in endpoints)
{
- var endpointJson = JsonSerializer.Serialize(endpoint, new JsonSerializerOptions { WriteIndented = true });
+ var endpointJson = JsonSerializer.Serialize(endpoint, Parameters.Indented);
Console.WriteLine(endpointJson);
var response = await httpClient.PostAsJsonAsync(parameters.OpcPublisher + "/v2/configuration/endpoints/list/nodes",
endpoint, cts.Token).ConfigureAwait(false);
var nodesJson = JsonSerializer.Serialize(JsonSerializer.Deserialize(
await response.Content.ReadAsStringAsync(cts.Token).ConfigureAwait(false)),
- new JsonSerializerOptions { WriteIndented = true });
+ Parameters.Indented);
Console.WriteLine(nodesJson);
}
diff --git a/samples/Http/Parameters.cs b/samples/Http/Parameters.cs
index 7803920a4d..51f667b363 100644
--- a/samples/Http/Parameters.cs
+++ b/samples/Http/Parameters.cs
@@ -8,6 +8,7 @@
using System.Diagnostics;
using System.Net.Http.Headers;
using System.Security.Cryptography.X509Certificates;
+using System.Text.Json;
///
/// Command line parameters
@@ -53,6 +54,8 @@ internal sealed class Parameters : IDisposable
///
public string? ApiKey { get; private set; }
+ internal static readonly JsonSerializerOptions Indented = new() { WriteIndented = true };
+
///
/// Create client
///
diff --git a/samples/Http/SetConfiguration/SetConfiguration.cs b/samples/Http/SetConfiguration/SetConfiguration.cs
index fa098a0d8e..4193ce418d 100644
--- a/samples/Http/SetConfiguration/SetConfiguration.cs
+++ b/samples/Http/SetConfiguration/SetConfiguration.cs
@@ -18,7 +18,7 @@
// Get original published nodes json configuration
var original = await httpClient.GetFromJsonAsync(parameters.OpcPublisher + "/v2/configuration?IncludeNodes=true",
JsonSerializerOptions.Default, cts.Token).ConfigureAwait(false);
-var json = JsonSerializer.Serialize(original, new JsonSerializerOptions { WriteIndented = true });
+var json = JsonSerializer.Serialize(original, Parameters.Indented);
Console.WriteLine("Original configuration: " + json);
// Clear all
@@ -27,10 +27,11 @@
clear.EnsureSuccessStatusCode();
var empty = await httpClient.GetFromJsonAsync(parameters.OpcPublisher + "/v2/configuration?IncludeNodes=true",
JsonSerializerOptions.Default, cts.Token).ConfigureAwait(false);
-json = JsonSerializer.Serialize(empty, new JsonSerializerOptions { WriteIndented = true });
+json = JsonSerializer.Serialize(empty, Parameters.Indented);
Console.WriteLine("Cleared to: " + json);
// Patch configuration to add new one
+
using var addOrUpdate = await httpClient.PatchAsJsonAsync(parameters.OpcPublisher + "/v2/configuration", new[]
{
new
@@ -52,7 +53,7 @@
var configuration = await httpClient.GetFromJsonAsync(parameters.OpcPublisher + "/v2/configuration?IncludeNodes=true",
JsonSerializerOptions.Default, cts.Token).ConfigureAwait(false);
-json = JsonSerializer.Serialize(configuration, new JsonSerializerOptions { WriteIndented = true });
+json = JsonSerializer.Serialize(configuration, Parameters.Indented);
Console.WriteLine("Patched to: " + json);
// Remove the endpoint and all its nodes again
@@ -66,7 +67,7 @@
configuration = await httpClient.GetFromJsonAsync(parameters.OpcPublisher + "/v2/configuration?IncludeNodes=true",
JsonSerializerOptions.Default, cts.Token).ConfigureAwait(false);
-json = JsonSerializer.Serialize(configuration, new JsonSerializerOptions { WriteIndented = true });
+json = JsonSerializer.Serialize(configuration, Parameters.Indented);
Console.WriteLine("Now cleared again: " + json);
// Re-apply original published nodes json configuration to the publisher
@@ -75,5 +76,5 @@
reset.EnsureSuccessStatusCode();
configuration = await httpClient.GetFromJsonAsync(parameters.OpcPublisher + "/v2/configuration?IncludeNodes=true",
JsonSerializerOptions.Default, cts.Token).ConfigureAwait(false);
-json = JsonSerializer.Serialize(configuration, new JsonSerializerOptions { WriteIndented = true });
+json = JsonSerializer.Serialize(configuration, Parameters.Indented);
Console.WriteLine("Now reset back to: " + json);
diff --git a/samples/IoTHub/GetConfiguration/GetConfiguration.cs b/samples/IoTHub/GetConfiguration/GetConfiguration.cs
index 05c08d745b..6ec858f346 100644
--- a/samples/IoTHub/GetConfiguration/GetConfiguration.cs
+++ b/samples/IoTHub/GetConfiguration/GetConfiguration.cs
@@ -29,7 +29,7 @@
var endpoints = JsonSerializer.Deserialize(response.GetPayloadAsJson()).GetProperty("endpoints").EnumerateArray();
foreach (var endpoint in endpoints)
{
- var endpointJson = JsonSerializer.Serialize(endpoint, new JsonSerializerOptions { WriteIndented = true });
+ var endpointJson = JsonSerializer.Serialize(endpoint, Parameters.Indented);
Console.WriteLine(endpointJson);
methodInvocation = new CloudToDeviceMethod("GetConfiguredNodesOnEndpoint")
{
@@ -42,6 +42,6 @@
// Response is too large, this will generate 413 when run against OPC PLC.
var nodesJson = JsonSerializer.Serialize(JsonSerializer.Deserialize(response.GetPayloadAsJson()),
- new JsonSerializerOptions { WriteIndented = true });
+ Parameters.Indented);
Console.WriteLine(nodesJson);
}
diff --git a/samples/IoTHub/Parameters.cs b/samples/IoTHub/Parameters.cs
index bde4dd8f5f..b9bc096d7b 100644
--- a/samples/IoTHub/Parameters.cs
+++ b/samples/IoTHub/Parameters.cs
@@ -5,6 +5,7 @@
using CommandLine;
using Microsoft.Azure.Devices;
+using System.Text.Json;
namespace InvokeDeviceMethod;
@@ -29,6 +30,8 @@ internal sealed class Parameters
"\nDefaults to value of environment variable 'EdgeHubConnectionString'.")]
public string? EdgeHubConnectionString { get; set; } = Environment.GetEnvironmentVariable("EdgeHubConnectionString");
+ internal static readonly JsonSerializerOptions Indented = new() { WriteIndented = true };
+
public static void ValidateConnectionStrings(string? hubConnectionString, string? edgeConnectionString,
out string deviceId, out string moduleId)
{
diff --git a/samples/Mqtt/GetConfiguration/GetConfiguration.cs b/samples/Mqtt/GetConfiguration/GetConfiguration.cs
index 0871735548..563823358d 100644
--- a/samples/Mqtt/GetConfiguration/GetConfiguration.cs
+++ b/samples/Mqtt/GetConfiguration/GetConfiguration.cs
@@ -9,7 +9,6 @@
using MQTTnet;
using MQTTnet.Extensions.Rpc;
using System.Text.Json;
-using System.Text;
// Connect to mqtt broker
var mqttFactory = new MqttFactory();
@@ -25,14 +24,14 @@
var response = await mqttRpcClient.ExecuteAsync(TimeSpan.FromSeconds(60), "GetConfiguredEndpoints",
default, MqttQualityOfServiceLevel.AtMostOnce).ConfigureAwait(false);
var endpoints = JsonSerializer.Deserialize(response).GetProperty("endpoints").EnumerateArray();
+var indented = new JsonSerializerOptions { WriteIndented = true };
foreach (var endpoint in endpoints)
{
- var endpointJson = JsonSerializer.Serialize(endpoint, new JsonSerializerOptions { WriteIndented = true });
+ var endpointJson = JsonSerializer.Serialize(endpoint, indented);
Console.WriteLine(endpointJson);
response = await mqttRpcClient.ExecuteAsync(TimeSpan.FromSeconds(60), "GetConfiguredNodesOnEndpoint",
endpointJson, MqttQualityOfServiceLevel.AtMostOnce).ConfigureAwait(false);
- var nodesJson = JsonSerializer.Serialize(JsonSerializer.Deserialize(response),
- new JsonSerializerOptions { WriteIndented = true });
+ var nodesJson = JsonSerializer.Serialize(JsonSerializer.Deserialize(response), indented);
Console.WriteLine(nodesJson);
}
diff --git a/samples/mqtt/readme.md b/samples/mqtt/readme.md
index 7368b9dba6..414e268060 100644
--- a/samples/mqtt/readme.md
+++ b/samples/mqtt/readme.md
@@ -9,7 +9,7 @@ cd docker
docker compose -f docker-compose.yaml -f with-mosquitto.yaml up
```
-The samples will communicate through the mosquitto broker which runs at localhost:1883.
+The samples will communicate through the mosquitto broker which runs at localhost:1883.
> For simplicity of the same, the broker is listening on port 1883 and thus an unencrypted connection is used. In production, ensure to use TLS.
The sample uses the MQTT.net RPC library. The MQTT.net RPC libary does not support error conditions, and the ExecuteAsync call returns just the
diff --git a/src/Azure.IIoT.OpcUa.Publisher.Models/src/HistoryUpdateOperation.cs b/src/Azure.IIoT.OpcUa.Publisher.Models/src/HistoryUpdateOperation.cs
index d3ac288361..effc0652e8 100644
--- a/src/Azure.IIoT.OpcUa.Publisher.Models/src/HistoryUpdateOperation.cs
+++ b/src/Azure.IIoT.OpcUa.Publisher.Models/src/HistoryUpdateOperation.cs
@@ -13,11 +13,6 @@ namespace Azure.IIoT.OpcUa.Publisher.Models
[DataContract]
public enum HistoryUpdateOperation
{
- ///
- /// None
- ///
- None = 0,
-
///
/// Insert
///
diff --git a/src/Azure.IIoT.OpcUa.Publisher.Models/src/NodeAttribute.cs b/src/Azure.IIoT.OpcUa.Publisher.Models/src/NodeAttribute.cs
index ba6e003447..1d193baec3 100644
--- a/src/Azure.IIoT.OpcUa.Publisher.Models/src/NodeAttribute.cs
+++ b/src/Azure.IIoT.OpcUa.Publisher.Models/src/NodeAttribute.cs
@@ -13,11 +13,6 @@ namespace Azure.IIoT.OpcUa.Publisher.Models
[DataContract]
public enum NodeAttribute
{
- ///
- /// None
- ///
- None = 0,
-
///
/// Node identifier
///
diff --git a/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/CertificatesController.cs b/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/CertificatesController.cs
index 612053ef6f..a4a0c9ad46 100644
--- a/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/CertificatesController.cs
+++ b/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/CertificatesController.cs
@@ -14,6 +14,7 @@ namespace Azure.IIoT.OpcUa.Publisher.Module.Controllers
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
+ using System.ComponentModel.DataAnnotations;
///
///
@@ -97,7 +98,8 @@ public async Task> ListCertificateRevocationListsAsync(
/// is null.
[HttpPatch("{store}/certs")]
public async Task AddCertificateAsync(CertificateStoreName store,
- byte[] pfxBlob, [FromQuery] string? password, CancellationToken ct = default)
+ [FromBody][Required] byte[] pfxBlob, [FromQuery] string? password,
+ CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(pfxBlob);
await _certificates.AddCertificateAsync(store, pfxBlob, password,
@@ -118,7 +120,7 @@ await _certificates.AddCertificateAsync(store, pfxBlob, password,
/// is null.
[HttpPatch("{store}/crls")]
public async Task AddCertificateRevocationListAsync(CertificateStoreName store,
- byte[] crl, CancellationToken ct = default)
+ [FromBody][Required] byte[] crl, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(crl);
await _certificates.AddCertificateRevocationListAsync(store, crl,
@@ -138,7 +140,7 @@ await _certificates.AddCertificateRevocationListAsync(store, crl,
///
/// is null.
[HttpPost("trusted/certs")]
- public async Task AddCertificateChainAsync(byte[] certificateChain,
+ public async Task AddCertificateChainAsync([FromBody][Required] byte[] certificateChain,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(certificateChain);
@@ -176,7 +178,7 @@ await _certificates.ApproveRejectedCertificateAsync(thumbprint,
///
/// is null.
[HttpPost("https/certs")]
- public async Task AddTrustedHttpsCertificateAsync(byte[] certificateChain,
+ public async Task AddTrustedHttpsCertificateAsync([FromBody][Required] byte[] certificateChain,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(certificateChain);
diff --git a/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/ConfigurationController.cs b/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/ConfigurationController.cs
index eb7c3f3d6a..b64fb348e3 100644
--- a/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/ConfigurationController.cs
+++ b/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/ConfigurationController.cs
@@ -14,6 +14,7 @@ namespace Azure.IIoT.OpcUa.Publisher.Module.Controllers
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+ using System.ComponentModel.DataAnnotations;
///
///
@@ -61,7 +62,7 @@ public ConfigurationController(IConfigurationServices configServices)
/// is null.
[HttpPost("start")]
public async Task PublishStartAsync(
- RequestEnvelope request)
+ [FromBody][Required] RequestEnvelope request)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -84,7 +85,7 @@ public async Task PublishStartAsync(
/// is null.
[HttpPost("stop")]
public async Task PublishStopAsync(
- RequestEnvelope request)
+ [FromBody][Required] RequestEnvelope request)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -108,7 +109,7 @@ public async Task PublishStopAsync(
/// is null.
[HttpPost("bulk")]
public async Task PublishBulkAsync(
- RequestEnvelope request)
+ [FromBody][Required] RequestEnvelope request)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -131,7 +132,7 @@ public async Task PublishBulkAsync(
/// is null.
[HttpPost("list")]
public async Task PublishListAsync(
- RequestEnvelope request)
+ [FromBody][Required] RequestEnvelope request)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -154,7 +155,7 @@ public async Task PublishListAsync(
/// is null.
[HttpPost("nodes")]
public async Task PublishNodesAsync(
- PublishedNodesEntryModel request, CancellationToken ct = default)
+ [FromBody][Required] PublishedNodesEntryModel request, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
await _configServices.PublishNodesAsync(request, ct).ConfigureAwait(false);
@@ -177,7 +178,7 @@ public async Task PublishNodesAsync(
/// is null.
[HttpPost("nodes/unpublish")]
public async Task UnpublishNodesAsync(
- PublishedNodesEntryModel request, CancellationToken ct = default)
+ [FromBody][Required] PublishedNodesEntryModel request, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
await _configServices.UnpublishNodesAsync(request, ct).ConfigureAwait(false);
@@ -200,7 +201,7 @@ public async Task UnpublishNodesAsync(
/// is null.
[HttpPost("nodes/unpublish/all")]
public async Task UnpublishAllNodesAsync(
- PublishedNodesEntryModel request, CancellationToken ct = default)
+ [FromBody][Required] PublishedNodesEntryModel request, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
await _configServices.UnpublishAllNodesAsync(request, ct).ConfigureAwait(false);
@@ -222,11 +223,11 @@ public async Task UnpublishAllNodesAsync(
/// is null.
[HttpPatch]
public async Task AddOrUpdateEndpointsAsync(
- IReadOnlyList request, CancellationToken ct = default)
+ [FromBody][Required] IReadOnlyList request,
+ CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
- var endpoints = request.Select(e => e).ToList();
- await _configServices.AddOrUpdateEndpointsAsync(endpoints, ct).ConfigureAwait(false);
+ await _configServices.AddOrUpdateEndpointsAsync(request, ct).ConfigureAwait(false);
return new PublishedNodesResponseModel();
}
@@ -270,7 +271,8 @@ public async Task GetConfiguredEndpointsAsy
/// is null.
[HttpPut]
public async Task SetConfiguredEndpointsAsync(
- SetConfiguredEndpointsRequestModel request, CancellationToken ct = default)
+ [FromBody][Required] SetConfiguredEndpointsRequestModel request,
+ CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
await _configServices.SetConfiguredEndpointsAsync(new List(
@@ -294,7 +296,7 @@ await _configServices.SetConfiguredEndpointsAsync(new Listnull.
[HttpPost("endpoints/list/nodes")]
public async Task GetConfiguredNodesOnEndpointAsync(
- PublishedNodesEntryModel request, CancellationToken ct = default)
+ [FromBody][Required] PublishedNodesEntryModel request, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
var response = await _configServices.GetConfiguredNodesOnEndpointAsync(
diff --git a/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/DiscoveryController.cs b/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/DiscoveryController.cs
index 6ea00f1a82..5009619e61 100644
--- a/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/DiscoveryController.cs
+++ b/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/DiscoveryController.cs
@@ -12,6 +12,7 @@ namespace Azure.IIoT.OpcUa.Publisher.Module.Controllers
using System;
using System.Threading;
using System.Threading.Tasks;
+ using System.ComponentModel.DataAnnotations;
///
/// OPC UA and network discovery related API.
@@ -61,7 +62,7 @@ public DiscoveryController(INetworkDiscovery discover,
/// is null.
[HttpPost("findserver")]
public async Task FindServerAsync(
- ServerEndpointQueryModel endpoint, CancellationToken ct = default)
+ [FromBody][Required] ServerEndpointQueryModel endpoint, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(endpoint);
return await _servers.FindServerAsync(endpoint, ct).ConfigureAwait(false);
@@ -82,7 +83,8 @@ public async Task FindServerAsync(
///
/// is null.
[HttpPost("register")]
- public async Task RegisterAsync(ServerRegistrationRequestModel request,
+ public async Task RegisterAsync(
+ [FromBody][Required] ServerRegistrationRequestModel request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -106,7 +108,8 @@ public async Task RegisterAsync(ServerRegistrationRequestModel request,
///
/// is null.
[HttpPost]
- public async Task DiscoverAsync(DiscoveryRequestModel request,
+ public async Task DiscoverAsync(
+ [FromBody][Required] DiscoveryRequestModel request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -129,7 +132,8 @@ public async Task DiscoverAsync(DiscoveryRequestModel request,
///
/// is null.
[HttpPost("cancel")]
- public async Task CancelAsync(DiscoveryCancelRequestModel request,
+ public async Task CancelAsync(
+ [FromBody][Required] DiscoveryCancelRequestModel request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
diff --git a/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/GeneralController.cs b/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/GeneralController.cs
index fe8160a9a2..9f4949dfc7 100644
--- a/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/GeneralController.cs
+++ b/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/GeneralController.cs
@@ -14,6 +14,7 @@ namespace Azure.IIoT.OpcUa.Publisher.Module.Controllers
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
+ using System.ComponentModel.DataAnnotations;
///
///
@@ -71,7 +72,8 @@ public GeneralController(IConnectionServices endpoints,
/// is null.
[HttpPost("capabilities")]
public async Task GetServerCapabilitiesAsync(
- RequestEnvelope request, CancellationToken ct = default)
+ [FromBody][Required] RequestEnvelope request,
+ CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -98,7 +100,7 @@ public async Task GetServerCapabilitiesAsync(
/// is null.
[HttpPost("browse/first")]
public async Task BrowseAsync(
- RequestEnvelope request,
+ [FromBody][Required] RequestEnvelope request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -122,7 +124,7 @@ public async Task BrowseAsync(
/// is null.
[HttpPost("browse/next")]
public async Task BrowseNextAsync(
- RequestEnvelope request,
+ [FromBody][Required] RequestEnvelope request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -150,7 +152,7 @@ public async Task BrowseNextAsync(
/// is null.
[HttpPost("browse")]
public IAsyncEnumerable BrowseStreamAsync(
- RequestEnvelope request,
+ [FromBody][Required] RequestEnvelope request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -176,7 +178,7 @@ public IAsyncEnumerable BrowseStreamAsync(
/// is null.
[HttpPost("browse/path")]
public async Task BrowsePathAsync(
- RequestEnvelope request,
+ [FromBody][Required] RequestEnvelope request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -202,7 +204,7 @@ public async Task BrowsePathAsync(
/// is null.
[HttpPost("read")]
public async Task ValueReadAsync(
- RequestEnvelope request,
+ [FromBody][Required] RequestEnvelope request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -228,7 +230,8 @@ public async Task ValueReadAsync(
/// is null.
[HttpPost("write")]
public async Task ValueWriteAsync(
- RequestEnvelope request, CancellationToken ct = default)
+ [FromBody][Required] RequestEnvelope request,
+ CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -255,7 +258,8 @@ public async Task ValueWriteAsync(
/// is null.
[HttpPost("metadata")]
public async Task GetMetadataAsync(
- RequestEnvelope request, CancellationToken ct = default)
+ [FromBody][Required] RequestEnvelope request,
+ CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -277,7 +281,8 @@ public async Task GetMetadataAsync(
/// The compilation response.
[HttpPost("query/compile")]
public async Task CompileQueryAsync(
- RequestEnvelope request, CancellationToken ct = default)
+ [FromBody][Required] RequestEnvelope request,
+ CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -302,7 +307,8 @@ public async Task CompileQueryAsync(
/// is null.
[HttpPost("call/$metadata")]
public async Task MethodMetadataAsync(
- RequestEnvelope request, CancellationToken ct = default)
+ [FromBody][Required] RequestEnvelope request,
+ CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -330,7 +336,8 @@ public async Task MethodMetadataAsync(
/// is null.
[HttpPost("call")]
public async Task MethodCallAsync(
- RequestEnvelope request, CancellationToken ct = default)
+ [FromBody][Required] RequestEnvelope request,
+ CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -358,7 +365,8 @@ public async Task MethodCallAsync(
/// is null.
[HttpPost("read/attributes")]
public async Task NodeReadAsync(
- RequestEnvelope request, CancellationToken ct = default)
+ [FromBody][Required] RequestEnvelope request,
+ CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -386,7 +394,8 @@ public async Task NodeReadAsync(
/// is null.
[HttpPost("write/attributes")]
public async Task NodeWriteAsync(
- RequestEnvelope request, CancellationToken ct = default)
+ [FromBody][Required] RequestEnvelope request,
+ CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -413,7 +422,7 @@ public async Task NodeWriteAsync(
/// is null.
[HttpPost("historyread/first")]
public async Task> HistoryReadAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -440,7 +449,8 @@ public async Task> HistoryReadAsync(
/// is null.
[HttpPost("historyread/next")]
public async Task> HistoryReadNextAsync(
- RequestEnvelope request, CancellationToken ct = default)
+ [FromBody][Required] RequestEnvelope request,
+ CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -466,7 +476,7 @@ public async Task> HistoryReadNextAsy
/// is null.
[HttpPost("historyupdate")]
public async Task HistoryUpdateAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -491,7 +501,7 @@ public async Task HistoryUpdateAsync(
/// is null.
[HttpPost("certificate")]
public async Task GetEndpointCertificateAsync(
- EndpointModel endpoint, CancellationToken ct = default)
+ [FromBody][Required] EndpointModel endpoint, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(endpoint);
return await _certificates.GetEndpointCertificateAsync(endpoint,
@@ -513,7 +523,7 @@ public async Task GetEndpointCertificateAsync(
/// is null.
[HttpPost("history/capabilities")]
public async Task HistoryGetServerCapabilitiesAsync(
- RequestEnvelope request, CancellationToken ct = default)
+ [FromBody][Required] RequestEnvelope request, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -535,7 +545,7 @@ public async Task HistoryGetServerCapabilitiesAs
/// is null.
[HttpPost("history/configuration")]
public async Task HistoryGetConfigurationAsync(
- RequestEnvelope request,
+ [FromBody][Required] RequestEnvelope request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -561,7 +571,7 @@ public async Task HistoryGetConfigurationAsyn
/// is null.
[HttpPost("connect")]
public async Task ConnectAsync(
- RequestEnvelope request,
+ [FromBody][Required] RequestEnvelope request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -587,7 +597,7 @@ public async Task ConnectAsync(
/// is null.
[HttpPost("test")]
public async Task TestConnectionAsync(
- RequestEnvelope request,
+ [FromBody][Required] RequestEnvelope request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -610,7 +620,7 @@ public async Task TestConnectionAsync(
/// is null.
[HttpPost("disconnect")]
public async Task DisconnectAsync(
- RequestEnvelope request,
+ [FromBody][Required] RequestEnvelope request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
diff --git a/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/HistoryController.cs b/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/HistoryController.cs
index 82ac7dd68e..b9574f066e 100644
--- a/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/HistoryController.cs
+++ b/src/Azure.IIoT.OpcUa.Publisher.Module/src/Controllers/HistoryController.cs
@@ -13,6 +13,7 @@ namespace Azure.IIoT.OpcUa.Publisher.Module.Controllers
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
+ using System.ComponentModel.DataAnnotations;
///
///
@@ -62,7 +63,7 @@ public HistoryController(IHistoryServices historian)
/// is null.
[HttpPost("events/replace")]
public async Task HistoryReplaceEventsAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -89,7 +90,7 @@ public async Task HistoryReplaceEventsAsync(
/// is null.
[HttpPost("events/insert")]
public async Task HistoryInsertEventsAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -116,7 +117,7 @@ public async Task HistoryInsertEventsAsync(
/// is null.
[HttpPost("events/upsert")]
public async Task HistoryUpsertEventsAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -143,7 +144,7 @@ public async Task HistoryUpsertEventsAsync(
/// is null.
[HttpPost("events/delete")]
public async Task HistoryDeleteEventsAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -170,7 +171,7 @@ public async Task HistoryDeleteEventsAsync(
/// is null.
[HttpPost("values/delete/attimes")]
public async Task HistoryDeleteValuesAtTimesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -197,7 +198,7 @@ public async Task HistoryDeleteValuesAtTimesAsync(
/// is null.
[HttpPost("values/delete/modified")]
public async Task HistoryDeleteModifiedValuesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -224,7 +225,7 @@ public async Task HistoryDeleteModifiedValuesAsync(
/// is null.
[HttpPost("values/delete")]
public async Task HistoryDeleteValuesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -251,7 +252,7 @@ public async Task HistoryDeleteValuesAsync(
/// is null.
[HttpPost("values/replace")]
public async Task HistoryReplaceValuesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -278,7 +279,7 @@ public async Task HistoryReplaceValuesAsync(
/// is null.
[HttpPost("values/insert")]
public async Task HistoryInsertValuesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -305,7 +306,7 @@ public async Task HistoryInsertValuesAsync(
/// is null.
[HttpPost("values/upsert")]
public async Task HistoryUpsertValuesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -332,7 +333,7 @@ public async Task HistoryUpsertValuesAsync(
/// is null.
[HttpPost("events/read/first")]
public async Task> HistoryReadEventsAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -359,7 +360,7 @@ public async Task> HistoryReadEve
/// is null.
[HttpPost("events/read/next")]
public async Task> HistoryReadEventsNextAsync(
- RequestEnvelope request, CancellationToken ct = default)
+ [FromBody][Required] RequestEnvelope request, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -385,7 +386,7 @@ public async Task> HistoryRea
/// is null.
[HttpPost("values/read/first")]
public async Task> HistoryReadValuesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -412,7 +413,7 @@ public async Task> HistoryReadVal
/// is null.
[HttpPost("values/read/first/attimes")]
public async Task> HistoryReadValuesAtTimesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -439,7 +440,7 @@ public async Task> HistoryReadVal
/// is null.
[HttpPost("values/read/first/processed")]
public async Task> HistoryReadProcessedValuesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -466,7 +467,7 @@ public async Task> HistoryReadPro
/// is null.
[HttpPost("values/read/first/modified")]
public async Task> HistoryReadModifiedValuesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -493,7 +494,7 @@ public async Task> HistoryReadMod
/// is null.
[HttpPost("values/read/next")]
public async Task> HistoryReadValuesNextAsync(
- RequestEnvelope request, CancellationToken ct = default)
+ [FromBody][Required] RequestEnvelope request, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
ArgumentNullException.ThrowIfNull(request.Connection);
@@ -519,7 +520,7 @@ public async Task> HistoryRea
/// is null.
[HttpPost("values/read")]
public IAsyncEnumerable HistoryStreamValuesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -545,7 +546,7 @@ public IAsyncEnumerable HistoryStreamValuesAsync(
/// is null.
[HttpPost("values/read/modified")]
public IAsyncEnumerable HistoryStreamModifiedValuesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -571,7 +572,7 @@ public IAsyncEnumerable HistoryStreamModifiedValuesAsync(
/// is null.
[HttpPost("values/read/attimes")]
public IAsyncEnumerable HistoryStreamValuesAtTimesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -597,7 +598,7 @@ public IAsyncEnumerable HistoryStreamValuesAtTimesAsync(
/// is null.
[HttpPost("values/read/processed")]
public IAsyncEnumerable HistoryStreamProcessedValuesAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
@@ -623,7 +624,7 @@ public IAsyncEnumerable HistoryStreamProcessedValuesAsync(
/// is null.
[HttpPost("events/read")]
public IAsyncEnumerable HistoryStreamEventsAsync(
- RequestEnvelope> request,
+ [FromBody][Required] RequestEnvelope> request,
CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);