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 2021/12/09 18:37:00 UTC

[jira] [Commented] (CAMEL-17308) camel-yaml-dsl: REST

    [ https://issues.apache.org/jira/browse/CAMEL-17308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17456666#comment-17456666 ] 

Claus Ibsen commented on CAMEL-17308:
-------------------------------------

Yeah lets make it only one way to do this

Using get/post/delete etc make its more rest-ish and natural. Its also how other DSLs do this, Java, XML etc.
So IMHO we should do #2


> camel-yaml-dsl: REST
> --------------------
>
>                 Key: CAMEL-17308
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17308
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-yaml-dsl
>            Reporter: Marat Gubaidullin
>            Priority: Minor
>             Fix For: 3.15.0
>
>
> Current YAML REST DSL supports 2 ways of defining services:
> 1. verb-based
> {code:java}
> - rest:
>     verb:
>       - method: get
>         uri: "/foo"
> {code}
> 2. method-based
> {code:java}
> - rest:
>     get:
>       - uri: "/foo"
> {code}
> Also mixed code seems legit and confusing
> {code:java}
> - rest:
>     verb:
>       - method: get
>         uri: "/foo"
>     get:
>       - uri: "/getFoo"
> {code}
> Could we select the only one type of syntax in YAML DSL (ex. 2. method-based)?
> Otherwise it requires to support all of variants in tools like Karavan without additional value to end-user.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)