A customer approached me these days with som,e questions about interfacing. He wants to connect to xServer2 APIs and started with the clients we provide with the setup. He has some questions about versions and maybe we can exchange some details in this space:
And here's some instant feedback from Oliver:I downloaded client classes from the PTV xServer environmentand found the xserver-client-bundle-2.30.0.zip archive.These classes are connecting to via the Open API protocol. A first Unit test connect with https://xserver2-test.cloud.ptvgroup.com was succsessful.
Playing around with the classes raised some questions:
My questions:
- The generated API is based on the Microsoft.Rest library which is seen as "deprecated vom Microsoft.
- The generated API is based on the NewtonSoft library for serialization / deserialization of JSON
- Is the correct API / client bundle I am supposed to use?
- Is there an alternative approach provided by PTV which does not require Microsoft.Rest?
- Is there an API approach which uses the standard Microsoft JSON serializer / deserializer System.Text.Json?
Berndxserver-2 supports both SOAP and OpenAPI (v2) protocols. Depending on the protocol, the client classes can either be generated using the VS-tools (SOAP) or autorest (OpenAPI) https://github.com/Azure/autorest.
The code contained in the bundled classes was generated using WCF and autorest respectively DSC_UsingWithDotnet.htm
We only guarantee the compatibility of the OpenAPI-spec with autorest generator. If you want to be in control of the dependencies, one option would be to write your own proxy stub, as discussed here .