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

refactor(ENTESB-12218): Replace Swagger with Apicurio model API #7161

Merged

Conversation

christophd
Copy link
Contributor

This is the first step to replace Swagger model API with the Apicurio model API in order to support both version 2.x and 3.x of Open API specification at the same time.

This PR replaces the Swagger models API used in server-api-generator module.

Next step would be to add Open API 3.x support to that module in order to be able to process Open API 3 specifications.

Maven filtering is only available when running tests in Maven build. When running unit tests in IDE the tests fail because of missing resource filtering.
@syndesisio-bot
Copy link

@christophd The bot could not transition the ticket automatically, please update this Jira ticket manually: https://issues.jboss.org/browse/ENTESB-12218

@@ -13,7 +13,7 @@
"connectorFactory": "io.syndesis.connector.rest.swagger.ConnectorFactory",
"dependencies": [
{
"id": "@project.groupId@:@project.artifactId@:@project.version@",
"id": "io.syndesis.connector:connector-rest-swagger:@project.version@",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm odd, works without issues in my IDE, is this a permanent change? Doesn't the @project.version@ influence the running of tests as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should only work if you have run a Maven build before so Maven already applied the filtering in build output directory. When you do mvn clean from time to time you should get the errors.

I think @project.version@ makes sense and the version is not verified in unit tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my IDE is running Maven filtering on resources.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lucky you 😃

import static java.util.Optional.ofNullable;

/**
* @author Christoph Deppisch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer code without @author tags.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's in my IDE settings from ages ago. Perhaps I need to rethink

Copy link
Member

@zregvart zregvart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good, nice refactor and cleanup effort!

@christophd christophd merged commit 2c3759f into syndesisio:master Nov 19, 2019
@syndesisio-bot
Copy link

@christophd The bot could not transition the ticket automatically, please update this Jira ticket manually: https://issues.jboss.org/browse/ENTESB-12218

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants