hernanDatgDev commented on issue #5924:
URL: https://github.com/apache/camel-k/issues/5924#issuecomment-2463315268
Here is the basic groovy example I'm using (I originally used Java):
open-api-test.groovy:
```
// camel-k: trait=openapi.configmaps=basic-health-api
// camel-k: trait=knative-service.enabled=false
from('timer:heartbeat?period=5s')
.log('heartbeat')
.to('direct:health')
from('direct:health')
.setBody().constant('{"isHealthy":true}')
.log('${body}')
```
basic-health-api configmap contents:
```
{
"openapi": "3.0.2",
"info": {
"title": "basic-api",
"version": "1.0"
},
"paths": {
"/health": {
"get": {
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
},
"description": "default response description"
}
},
"operationId": "health"
}
}
}
}
```
📓 Note: The following can be included but times out in the same way manner
// camel-k: trait=camel.runtime-version=3.8.1
--
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]