I'm using Swagger Codegen to generate the C# files to allow me to interact with the API here (raw).
I'm using version 3.0.54 of the code generator, and ran it with:
java -jar .\swagger-codegen-cli.jar generate -i https://digital.nhs.uk/restapi/oas/324177 -l csharp The generator is creating an interface to represent the items that could be populated in the oneOf sections, such as:



Unfortunately, this interface has no implementations, so I cannot create a valid request. The generator doesn't even appear to have created any of the classes that I would expect to implement this interface. I would (perhaps naively) assume that a class called MedicationRequest would be created that implements the OneOfR4PrepareBodyEntryItems interface. The closest I get is a class called CreateMedicationRequestResource, but this doesn't implement the interface, and isn't even referenced anywhere else in the project.
Strangely, the OneOfR4PrepareBodyEntryItems interface created is not prefixed with I, though the generator was configured to prefix with I.
Have I misconfigured something? Am I using the codegen tool incorrectly? Is the OAS not well-structured?
Источник: https://stackoverflow.com/questions/781 ... mplemented