Open mboogerd opened 5 years ago
@jimschubert @wing328 I think we could create this with switches. I also have similar issues. This is a necessity when there are multiplie rest clients in the solution It should be possible to specify the model package/project, client package/project and api package/project. This is the same strategy for java spring.
The goal being that the model can be used in controller and in a dedicated project running background logic and in the api.
so the netcore asp server and the netcore rest client can share data via an intermediate business logic without messing up with the dependecy chain. the multiple rest api client also need not have duplicated client/configuration packages
Problem
Within one of my services, I access multiple APIs. When generating code for these APIs, a
Client
package is generated for each of them. This package contains classes that only vary in a few comment lines and default values forConfiguration
parameters. We end up with many classes/interfaces such asHttpMethod
, that are isomorphic yet incompatible acrossClient
packages.Proposal
Client
package under a fixed package (OpenAPI?) instead of the parameterised one.[API]Configuration
class that extends the currentClient.Configuration
class and provides the generated defaults for the upper class, such asbasePath
.Alternatively
clientPackage
code-gen parameter that allows overriding the package where theClient
files will be placedClient
package, as well as the default values in theConfiguration
class[API]Configuration
class that extends${clientPackage}.Configuration
class and provides the generated defaults for the upper class, such asbasePath
.