denisbr commented on issue #77:
URL:
https://github.com/apache/camel-k-examples/issues/77#issuecomment-1511076512
I updated the `openapi.yaml` and bumped the spec version to `3.0.3` then I
get a different error:
```json
{
"apiVersion": "v1",
"items": [
{
"apiVersion": "camel.apache.org/v1",
"kind": "Integration",
"metadata": {
"annotations": {
"camel.apache.org/operator.id": "camel-k"
},
"creationTimestamp": "2023-04-17T10:14:55Z",
"generation": 1,
"name": "api",
"namespace": "camel-api",
"resourceVersion": "63621",
"uid": "649e20a1-96fc-42fe-bc92-87e8b06244ca"
},
"spec": {
"dependencies": [
"camel:openapi-java"
],
"sources": [
{
"content": "// camel-k: language=java
dependency=camel-quarkus-openapi-java \n\nimport
org.apache.camel.builder.AggregationStrategies;\nimport
org.apache.camel.builder.RouteBuilder;\n\npublic class API extends RouteBuilder
{\n @Override\n public void configure() throws Exception {\n\n // All
endpoints starting from \"direct:...\" reference an operationId defined\n //
in the \"openapi.yaml\" file.\n\n // List the object names available in the
S3 bucket\n from(\"direct:list\")\n
.to(\"aws2-s3://{{api.bucket}}?operation=listObjects\")\n
.split(simple(\"${body}\"), AggregationStrategies.groupedBody())\n
.transform().simple(\"${body.key}\")\n .end()\n
.marshal().json();\n\n\n // Get an object from the S3 bucket\n
from(\"direct:get\")\n .setHeader(\"CamelAwsS3Key\",
simple(\"${header.name}\"))\n
.to(\"aws2-s3://{{api.bucket}}?operation=getObject\")\n
.convertBodyTo(String.class);\n\n\n // Upload a n
ew object into the S3 bucket\n from(\"direct:create\")\n
.setHeader(\"CamelAwsS3Key\", simple(\"${header.name}\"))\n
.to(\"aws2-s3://{{api.bucket}}\")\n .setBody().constant(\"\");\n\n\n //
Delete an object from the S3 bucket\n from(\"direct:delete\")\n
.setHeader(\"CamelAwsS3Key\", simple(\"${header.name}\"))\n
.to(\"aws2-s3://{{api.bucket}}?operation=deleteObject\")\n
.setBody().constant(\"\");\n\n }\n}\n",
"name": "API.java"
},
{
"content": "// camel-k: language=java\npackage
test;\n\nimport org.apache.camel.BindToRegistry;\nimport
org.apache.camel.PropertyInject;\n\nimport
com.amazonaws.auth.AWSCredentials;\nimport
com.amazonaws.auth.AWSCredentialsProvider;\nimport
com.amazonaws.auth.AWSStaticCredentialsProvider;\nimport
com.amazonaws.auth.BasicAWSCredentials;\nimport
com.amazonaws.client.builder.AwsClientBuilder;\nimport
com.amazonaws.services.s3.AmazonS3;\nimport
com.amazonaws.services.s3.AmazonS3ClientBuilder;\n\npublic class
MinioCustomizer {\n\n @BindToRegistry\n public static AmazonS3
minioClient(\n @PropertyInject(\"minio.endpoint\") String
endpointAddress,\n @PropertyInject(\"minio.access-key\") String
accessKey,\n @PropertyInject(\"minio.secret-key\") String secretKey)
{\n\n AwsClientBuilder.EndpointConfiguration endpoint = new
AwsClientBuilder.EndpointConfiguration(endpointAddress, \"US_EAST_1\");\n
AWSCredentials crede
ntials = new BasicAWSCredentials(accessKey, secretKey);\n
AWSCredentialsProvider credentialsProvider = new
AWSStaticCredentialsProvider(credentials);\n\n return
AmazonS3ClientBuilder\n .standard()\n
.withEndpointConfiguration(endpoint)\n
.withCredentials(credentialsProvider)\n
.withPathStyleAccessEnabled(true)\n .build();\n\n }\n\n}\n",
"name": "MinioCustomizer.java"
}
],
"traits": {
"camel": {
"properties": [
"api.bucket = camel-k",
"minio.endpoint = http://minio:9000",
"minio.access-key = minio",
"minio.secret-key = minio123",
"camel.context.rest-configuration.api-context-path = /openapi.json"
]
},
"openapi": {
"configmaps": [
"cm-932a65b65ddfcd2cf46ecb13e8e8917190561db3"
]
}
}
},
"status": {
"capabilities": [
"rest"
],
"conditions": [
{
"firstTruthyTime": "2023-04-17T10:14:55Z",
"lastTransitionTime": "2023-04-17T10:14:55Z",
"lastUpdateTime": "2023-04-17T10:14:55Z",
"message": "camel-api/camel-k",
"reason": "IntegrationPlatformAvailable",
"status": "True",
"type": "IntegrationPlatformAvailable"
},
{
"lastTransitionTime": "2023-04-17T10:15:14Z",
"lastUpdateTime": "2023-04-17T10:15:14Z",
"message": "error during trait customization:
dependency camel:openapi-java not found in Camel catalog",
"reason": "InitializationFailed",
"status": "False",
"type": "Ready"
}
],
"dependencies": [
"mvn:org.apache.camel.quarkus:camel-quarkus-platform-http",
"mvn:org.apache.camel.quarkus:camel-quarkus-rest"
],
"digest": "vqUf3F7AsVMtGGVM0pRJ9Pbbuq_6XDFTCQBLjubqpXhY",
"generatedSources": [
{
"contentRef": "api-openapi-000",
"language": "xml",
"name": "openapi.xml"
}
],
"observedGeneration": 1,
"phase": "Error",
"platform": "camel-k",
"profile": "Knative",
"runtimeProvider": "quarkus",
"runtimeVersion": "1.17.0"
}
}
],
"kind": "List",
"metadata": {
"resourceVersion": ""
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]