Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SCS-MultiApi-Plugin][OpenApi] Problem generating multiple clients with different FileSpecs #66

Closed
Rivarsal opened this issue Jun 16, 2022 · 0 comments · Fixed by #71
Closed
Assignees
Labels
bug Something isn't working

Comments

@Rivarsal
Copy link
Contributor

As of right now, if we try to generate multiple clients with different fileSpecs, the second execution of the plugin will override the first client and it will not be generated. For example, with the next pom configuration:

<fileSpecs>
	<fileSpec>
		<inputSpec>${project.basedir}/src/main/resources/api/api.yml</inputSpec>
		<apiPackage>com.corunet.training.controller</apiPackage>
		<modelPackage>com.corunet.training.model</modelPackage>
		<callMode>true</callMode>
		<isReactive>true</isReactive>
		<modelNameSuffix>DTO</modelNameSuffix>
        </fileSpec>
	<fileSpec>
		<inputSpec>${project.basedir}/src/main/resources/api/api2.yml</inputSpec>
		<apiPackage>com.corunet.training.controllerTest</apiPackage>
		<modelPackage>com.corunet.training.test</modelPackage>
		<callMode>true</callMode>
		<modelNameSuffix>DTO</modelNameSuffix>
	</fileSpec>
</fileSpecs>

The second client, which is supposed to be an ApiWebClient will not be generated and it will create the following error:

image

As a developer I would like this to be addressed and fixed

@Rivarsal Rivarsal added the bug Something isn't working label Jun 16, 2022
@jmejutovazquez jmejutovazquez self-assigned this Jun 17, 2022
jmejutovazquez added a commit that referenced this issue Jun 20, 2022
# Conflicts:
#	pom.xml
#	src/main/java/net/coru/api/generator/plugin/OpenapiMultiFileMojo.java
#	src/main/java/net/coru/api/generator/plugin/openapi/template/TemplateFactory.java
jmejutovazquez added a commit that referenced this issue Jun 20, 2022
# Conflicts:
#	README.md
#	src/main/java/net/coru/api/generator/plugin/openapi/template/TemplateFactory.java
jmejutovazquez added a commit that referenced this issue Jun 20, 2022
jmejutovazquez added a commit that referenced this issue Jun 21, 2022
fcampostato pushed a commit that referenced this issue Jun 21, 2022
* #67 Add clientPackage to FileSpec object and check that the client packages do not match

* #66 Fix tests and update pom version

* #66 Update pom version

* #66 Update pom version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants