You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2024/08/05 07:24:00 UTC
[jira] [Commented] (CAMEL-20979) null operation name when using contract first api
[ https://issues.apache.org/jira/browse/CAMEL-20979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17870961#comment-17870961 ]
Claus Ibsen commented on CAMEL-20979:
-------------------------------------
operationId string Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
> null operation name when using contract first api
> -------------------------------------------------
>
> Key: CAMEL-20979
> URL: https://issues.apache.org/jira/browse/CAMEL-20979
> Project: Camel
> Issue Type: Improvement
> Affects Versions: 4.7.0
> Reporter: Federico Mariani
> Priority: Major
>
> When using [contract first rest dsl openapi|https://camel.apache.org/manual/rest-dsl-openapi.html] the following yaml open api (taken from https://swagger.io/docs/specification/basic-structure/)
> {code:java}
> openapi: 3.0.0
> info:
> title: Sample API
> description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.
> version: 0.1.9
> servers:
> - url: http://api.example.com/v1
> description: Optional server description, e.g. Main (production) server
> - url: http://staging-api.example.com
> description: Optional server description, e.g. Internal staging server for testing
> paths:
> /users:
> get:
> summary: Returns a list of users.
> description: Optional extended description in CommonMark or HTML.
> responses:
> '200': # status code
> description: A JSON array of user names
> content:
> application/json:
> schema:
> type: array
> items:
> type: string
> {code}
> generate the following log if missing routes are ignored
> {code:java}
> 2024-07-15T12:11:30.635+02:00 WARN 12918 --- [ main] .r.o.DefaultRestOpenapiProcessorStrategy : OpenAPI specification has 1 unmapped operations to corresponding routes:
> direct:null
> This validation error is ignored.
> {code}
> in particular, _direct:null_ route has to be created, given that openrationId is not provided, is it expected? can route name be dynamically generated via $path + $verb?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)