Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Merge remote-tracking branch 'origin/master' into camel-3.x

  1. … 37 more files in changeset.
[CAMEL-12914]camel-rest-swagger - Unit test fails after jetty upgrade

Move stuff around to isolate o.a.c.util from o.a.c and o.a.c.support from o.a.c.impl

# Conflicts:

# camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpointProcessor.java

  1. … 2743 more files in changeset.
CAMEL-12728: much better TLS/SSL configuration ...

...in `camel-rest-swagger`

Setting up TLS/SSL settings in `camel-rest-swagger` was limited to the

delegate component being configured and present in the context. This

adds support for setting TLS/SSL configuration via Camel's standard

`SSLContextParameters` and `useGlobalSslContextParameters` flag used in

many components that deal with TLS/SSL.

In addition to that, this adds a new parameter considered in the

`RestProducerFactory` SPI: now parameters that need to be applied to the

delegate component can be specified in the `component` key of the

parameter Map. Those properties will be only considered if the component

is not already present in the Camel context. That is, if the

`CamelContext::getEndpoint` would have the side effect of creating the

delegate component and adding it to the Camel context. Now that

component can be customized with properties from the `component`

parameters Map.

    • -0
    • +75
    ./Jetty94ServerFactory.java
    • -0
    • +41
    ./RestSwaggerDelegateHttpsTest.java
    • -0
    • +33
    ./RestSwaggerGlobalHttpsTest.java
  1. … 12 more files in changeset.
CAMEL-11968: Support literal values in endpoint...

... parameters

Adds support for literal values, i.e. a predefined constant values that

can be specified directly on the REST Swagger component's endpoint URI

and passed along to the delegating component in the URI.

    • -1
    • +3
    ./RestSwaggerEndpointUriParsingTest.java
  1. … 3 more files in changeset.
CAMEL-11091 REST Swagger handling of empty spec...

...ificationUri

The specificatonUri for endpoint URIs starting with `#` in the remaining

part of the URI (i.e. `rest-swagger:#getPetById`) now default to

`swagger.json`.

  1. … 1 more file in changeset.
CAMEL-11051 Support query parameters in rest-sw...

...agger

Adds REST endpoint `queryParameters` property based on the Swagger

specification. It is expected that the same-named parameters are present

in the headers of the incoming message.

  1. … 1 more file in changeset.
CAMEL-10932 REST Swagger component

This includes the initial implementation of the `rest-swagger` component

that allows for a higher level abstraction over the REST API usage from

other Camel components that implement the `RestProducerFactory` SPI

combined with Swagger (Open API) specifications.

The most simple usage would be:

to("rest-swagger:getPetById")

Which would pick up the Swagger specification from `swagger.json` and

try to find a single component that implements the `RestProducerFactory`

SPI and invoke the `getPetById` operation.

Other way of using this component could be:

to("rest-swagger:http://petstore.swagger.io/v2/swagger.json#getPetById")

That loads the Swagger specification from the

`http://petstore.swagger.io/v2/swagger.json` URL and invokes the

`getPetById` operation.

More concise way of configuring would be to configure most properties

on the component add it to CamelContext, and use only `operationId` path

parameter when triggering the exchange:

// add `petstore` component to the CamelContext

RestSwaggerComponent petstore =

new RestSwaggerComponent(camelContext);

petstore.setSpecificationUri("http://petstore.swagger.io/v2/swagger.json");

petstore.setComponentName("undertow");

camelContext.addComponent("petstore", petstore);

And then use `operationId` in endpoint definition:

ProducerTemplate template = camelContext.getProducerTemplate();

template.requestBodyAndHeaders("petstore:getPetById", null, "petId",

petId);

    • -0
    • +152
    ./RestSwaggerComponentTest.java
    • -0
    • +336
    ./RestSwaggerEndpointTest.java
    • -0
    • +66
    ./RestSwaggerEndpointUriParsingTest.java
    • -0
    • +50
    ./RestSwaggerHelperTest.java
  1. … 25 more files in changeset.