The camel-oas-archetype generates end points and implementation stubs given an OpenAPI specification. What happens when that OAS document changes? This task is to explore what updates to an existing Camel app can be done.
One possible approach:
Parse the new OpenAPI spec and generate a list of operation codes.
Check the RoutesGenerated class for route endpoint definitions.
Collect any missing operation codes.
Inject a new route endpoint for any missing codes.
Inject a new stub for all new endpoint implementations.
This will handle the following cases:
A new resource path node is added.
A new REST method is added to an existing resource path.
Might be able handle:
Deleted resource paths.
Name changes in a resource path. (have a flag to indicate leaving old code in place, perhaps with a TODO comment)
It would not be able to handle the following cases, at least initially:
The camel-oas-archetype generates end points and implementation stubs given an OpenAPI specification. What happens when that OAS document changes? This task is to explore what updates to an existing Camel app can be done.
One possible approach:
This will handle the following cases:
Might be able handle:
It would not be able to handle the following cases, at least initially: