Skip to content

Commit

Permalink
Fix open-api setup
Browse files Browse the repository at this point in the history
  • Loading branch information
lburgazzoli committed Oct 14, 2020
1 parent 8c63df6 commit bdcf6cc
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion API.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// camel-k: language=java dependency=camel-openapi-java
// camel-k: language=java dependency=camel-quarkus-openapi-java

import org.apache.camel.builder.AggregationStrategies;
import org.apache.camel.builder.RouteBuilder;
Expand Down
4 changes: 2 additions & 2 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ info:
version: 1.0.0
description: A CRUD API for an object store
paths:
/:
/v1:
get:
responses:
"200":
Expand All @@ -18,7 +18,7 @@ paths:
description: Object list
operationId: list
summary: List the objects
/{name}:
/v1/{name}:
get:
responses:
"200":
Expand Down
14 changes: 7 additions & 7 deletions readme.didact.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,18 @@ To run the integration, you need to link it to the proper configuration, that de
As alternative, to connect the integration to the **test Minio server** deployed before:

```
kamel run --name api API.java --property-file test/minio.properties --open-api openapi.yaml -d camel-openapi-java
kamel run API.java --open-api openapi.yaml --property-file test/minio.properties
```
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20--name%20api%20API.java%20--property-file%20test/minio.properties%20--open-api%20openapi.yaml%20-d%20camel-openapi-java&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20API.java%20--open-api%20openapi.yaml%20--property-file%20test/minio.properties&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})

### 4.2 [Alternative 2] Using the S3 service

To connect the integration to the **AWS S3 service**:

```
kamel run API.java --property-file s3.properties --open-api openapi.yaml -d camel-openapi-java
kamel run API.java --open-api openapi.yaml --property-file s3.properties
```
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20API.java%20--property-file%20s3.properties%20--open-api%20openapi.yaml%20-d%20camel-openapi-java&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20API.java%20--open-api%20openapi.yaml%20--property-file%20s3.properties&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})


## 5. Using the API
Expand All @@ -213,7 +213,7 @@ NOTE: it may take some time, the first time you run the integration, for it to r
After the integraiton has reached the running state, you can get the route corresponding to it via the following command:

```
URL=$(oc get routes.serving.knative.dev api -o jsonpath='{.status.url}')
URL=$(oc get routes.serving.knative.dev api -o jsonpath='{.status.url}')/v1
```
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$URL%3D%24%28oc%20get%20routes.serving.knative.dev%20api%20-o%20jsonpath%3D%27%7B.status.url%7D%27%29&completion=Getting%20route. "Opens a new terminal and sends the command above"){.didact})

Expand Down Expand Up @@ -302,9 +302,9 @@ and manage it. This process is accomplished via the `3scale` trait in Camel K.
As alternative, to connect the integration to the **test Minio server**:

```
kamel run --name api API.java --property-file test/minio.properties --open-api openapi.yaml -t 3scale.enabled=true -t 3scale.description-path=/openapi.json --profile OpenShift
kamel run API.java --property-file test/minio.properties --open-api openapi.yaml -t 3scale.enabled=true -t 3scale.description-path=/openapi.json --profile OpenShift
```
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20--name%20api%20API.java%20--property-file%20test%2Fminio.properties%20--open-api%20openapi.yaml%20-t%203scale.enabled%3Dtrue%20-t%203scale.description-path%3D%2Fopenapi.json%20--profile%20OpenShift&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})
([^ execute](didact://?commandId=vscode.didact.sendNamedTerminalAString&text=camelTerm$$kamel%20run%20API.java%20--property-file%20test%2Fminio.properties%20--open-api%20openapi.yaml%20-t%203scale.enabled%3Dtrue%20-t%203scale.description-path%3D%2Fopenapi.json%20--profile%20OpenShift&completion=Integration%20run. "Opens a new terminal and sends the command above"){.didact})

### 7.2 [Alternative 2] Using the S3 service

Expand Down
2 changes: 1 addition & 1 deletion s3.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ camel.component.aws-s3.access-key=<put-your-aws-access-key-id-here>
camel.component.aws-s3.secret-key=<put-your-aws-access-key-secret-here>

# General configuration
camel.context.rest-configuration.api-context-path=/openapi.json
camel.rest.api-context-path = /openapi.json
2 changes: 1 addition & 1 deletion test/minio.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ camel.component.aws2-s3.uri-endpoint-override = {{minio.endpoint}}
camel.component.aws2-s3.override-endpoint = true

# General configuration
camel.context.rest-configuration.api-context-path=/openapi.json
camel.rest.api-context-path = /openapi.json
2 changes: 1 addition & 1 deletion test/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ pre:
run: |
kamel install -w -n ${YAKS_NAMESPACE}
kamel run --name api ../API.java --property-file minio.properties --open-api ../openapi.yaml -d camel-openapi-java -w -n ${YAKS_NAMESPACE}
kamel run --name api ../API.java --property-file minio.properties --open-api ../openapi.yaml -w -n ${YAKS_NAMESPACE}

0 comments on commit bdcf6cc

Please sign in to comment.