1

I'm trying to create a separate .NET Core library project for all generated files which I can implement in my API code.

That way generation does not delete/change my actual API like it does if you generate all of it.

I can use:

docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate 
  -i /local/generated/swagger.yaml 
  -g aspnetcore 
  -o /local/abstract 
  --additional-properties=packageName=Test.Abstract

To generate a full working server stub, but how do i modify this to only generate the library from the Swagger file?

I tried adding buildTarget like this:

--additional-properties=packageName=InsuranceDomain.Abstract,buildTarget=library

but that results in an error:

[error] Found unexpected parameters: [buildTarget=library]

1 Answer 1

2

Have you tried:

--additional-properties "packageName=InsuranceDomain.Abstract,buildTarget=library"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.