rh-integration / IntegrationApp-Automation

Sample Integration application along with lifecycle automation
Apache License 2.0
13 stars 9 forks source link

update the fisuser-service to use Apicurito #23

Closed nmasse-itix closed 5 years ago

nmasse-itix commented 5 years ago

Quoting Gary Gaughan:

The fis user service uses community and then dev studio. [1]
Using Apicutio standalone using the camel project generator button to generate the skeleton code, might be our best foot forward.
—gary

[1] https://github.com/rh-integration/IntegrationApp-Automation/tree/master/fisuser-service
gaughan commented 5 years ago

I'm happy to add more detail if required?

nmasse-itix commented 5 years ago

Quick question: does the Camel code generation handle code update (when the API Contract is updated ?)

gaughan commented 5 years ago

Its a stateless version of apicurito, while the window is open you can update and edit. Generating a new project will update and work. It will download a new fuse SB project to your local machine.

redhatHameed commented 5 years ago

@gaughan if I am not wrong, you're pointing us to use the approach, somehow given in this article https://access.redhat.com/documentation/en-us/red_hat_fuse/7.2/html-single/designing_apis_with_apicurito/index

gaughan commented 5 years ago

Yes

redhatHameed commented 5 years ago

@gaughan Thanks for your input, I have changed the approach now using Apicutio to generate the skeleton code. https://github.com/rh-integration/IntegrationApp-Automation/tree/master/fuse-user-service#api-curio-setup

gaughan commented 5 years ago

Awesome, thanks!

gaughan commented 5 years ago

So the instructions mention, design and download your api and then rename it. You don't need this step. When you download the fuse project, the api defn is in the resources directory as openapi.json If you run mvn on this project the defn is available and published at endpoint/openapi.json

redhatHameed commented 5 years ago

you're right, it gets generated with name openapi.json, and it's not necessary to change the name, but as in my case, I have the different project's so I want to make clear when user access like curl http://localhost:8080/cicd/userservice-spec.json he knows that, which project open API file he accessing.

gaughan commented 5 years ago

So this is one part of a bigger walkthrough? If you run it as described from this set of instrustions alone, even with renaming, openapi.json is still our one source of truth and is available at http://localhost:8080/openapi.json