Cameron Fitzwater created CAMEL-25593:
-----------------------------------------

             Summary: camel validate normalize for rest verbs fails
                 Key: CAMEL-25593
                 URL: https://issues.apache.org/jira/browse/CAMEL-25593
             Project: Camel
          Issue Type: Bug
          Components: camel-jbang
    Affects Versions: 4.22.1
            Reporter: Cameron Fitzwater


When performing:
camel validate normalize new.camel.yaml

On:
{code:java}
- rest:
    path: "/"
    produces: "application/json"
    get:
      - id: "getHydroSnapshots"
        path: "/snapshots"
        param:
          - type: "query"
            name: "set"
            description: "Options: ferc, noaa"
            required: true
        to: "direct:get-pi-values"{code}
Generates:
{code:java}
- rest:
    path: /
    produces: application/json
    verbs:
      - id: getHydroSnapshots
        path: /snapshots
        params:
          - description: "Options: ferc, noaa"
            name: set
            type: query
        to:
          uri: direct
          parameters:
            name: get-pi-values{code}
 .. and fails with:
{noformat}
Caused by: Unsupported field: verbs
 in file:new-normalize.camel.yaml, line 5, column 7:
          - id: getHydroSnapshots
          ^{noformat}

Sidenote: `required` appears to be getting dropped to, but my assumption there 
is that is due to it not being a supported field.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to