Skip to content

Conversation

@zregvart
Copy link
Member

@zregvart zregvart commented Feb 8, 2017

This removes the SwaggerRestProducerFactory and moves the
responsibility of configuring rest clients to a new SPI
(RestEndpointConfigurer).

The rest endpoint URI has been changed to allow for syntax like:

rest:<component>[:componentSpecific]

Or in case of Swagger:

rest:swagger:getPetById?apiDoc=petstore.json

The SPI is discovered in the META-INF/services/org/apache/camel/rest
properties file with the prefix configurer. so any other components
wishing to configure rest endpoints via this configurer SPI should add
rest file with configurer.class property.

I would like feedback on the following issues:

  • instead of META-INF/.../rest use different properties file?
  • design of the RestEndpointConfigurer SPI interface (for instance: is
    it sufficient so that it can be used to plug in headers, or
    authentication callbacks for rest)
  • integration with service discovery ({{service:...}})?
  • properties missing from Swagger specification (notably host, and
    port) -- current idea is that that should be provided from
    RestConfiguration

... support in camel-core

This removes the `SwaggerRestProducerFactory` and moves the
responsibility of configuring rest clients to a new SPI
(`RestEndpointConfigurer`).

The rest endpoint URI has been changed to allow for syntax like:

    rest:<component>[:componentSpecific]

Or in case of Swagger:

    rest:swagger:getPetById?apiDoc=petstore.json

The SPI is discovered in the `META-INF/services/org/apache/camel/rest`
properties file with the prefix `configurer.` so any other components
wishing to configure rest endpoints via this configurer SPI should add
`rest` file with `configurer.class` property.

I would like feedback on the following issues:
 - instead of `META-INF/.../rest` use different properties file?
 - design of the RestEndpointConfigurer SPI interface (for instance: is
it sufficient so that it can be used to plug in headers, or
authentication callbacks for rest)
 - integration with service discovery ({{service:...}})?
 - properties missing from Swagger specification (notably host, and
port) -- current idea is that that should be provided from
`RestConfiguration`
@davsclaus
Copy link
Contributor

I have a bit doubt about the rest swagger stuff I did, and why it was so generic.
The drawback with making this so generic is that

  • bad tooling support
  • a bit confusing to use (too generic)
  • only 1 implementation of api-doc = swagger. Not really seeing that there are many other alternatives out there

I wonder if we have rest-swagger as component instead of rest:swagger: etc. Then it can make it stand out as a component and its just like any other component.

I would like if you can look into that. The rest-swagger may built on top of the generic stuff we have now/you have, but from end users they should use rest-swagger so we have it as a 1st class component and also available from the camel-catalog / documentation / component list et all.

@zregvart
Copy link
Member Author

Thanks @davsclaus let's try to go down that route

@zregvart zregvart closed this Feb 13, 2017
zregvart pushed a commit to zregvart/camel that referenced this pull request Jul 9, 2021
ENTESB-14211 - Upgrade Flink to version 10.1
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.

2 participants