Skip to content

Refactor rest Operation #420

Closed
Closed
@cdavernas

Description

@cdavernas

What would you like to be added:

  1. Rename the rest operation type into openapi: the actual REST operation is an openapi operation, and could therefore be confusing to some.
  2. Create a rest operation type, which allows configuring a request from top to bottom, thus enabling out-of-the-box support for legacy systems.

The rest operation definition could look like this:

- name: MyOperation
  operation: 'http://mysite.com/api/{pathParam}#POST'
  type: rest

And it's reference like this:

- name: MyAction
  functionRef:
    refName: MyOperation
    arguments:
      headers:
        - name: headerParam
          value: 'headerValue'
      path:
        - name: pathParam   #references the {pathParam} value in the operation url
          value: 'myendpoint' #replaces the {pathParam} value in the operation url
      query:
        - name: queryParam
          value: 'queryvalue'
      cookie:
        - name: cookieParam
          value: 'cookievalue'
      body:
        firstName: Tihomir
        lastName: Surdilovic

Why is this needed:

  1. Calling a cat a cat 😸
  2. Allows out-of-the-box support for legacy systems and broadens SW use cases even further 🔫

Notes for implementers:

The idea is basically to allow users to somehow mimic an OpenAPI doc in place of a function reference's arguments property, thus allowing the invocation of "dumb" http services.

Metadata

Metadata

Assignees

Labels

change: featureNew feature or request. Impacts in a minor version change

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions