Skip to content

[Spike] Support Open API format from profile #124

Description

@visola

Description

Open API is the de facto format to describe REST APIs and it would be good to have an automated way to point to an Open API definition file (JSON), that would be pulled, cached and translated to an understandable format.

It should load the base server and port.

When adding a definition file to a profile, it would automatically map all the endpoints defined in there using some pattern, need to investigate more but the idea is that something like: /users/{userId}: get would become users_userid_get.

Another thing that would be useful is to have parameters automatically checked against variables. So that an endpoint that had a parameter like the following:

parameters:
  - in: query
    name: offset
    schema:
      type: integer

when called like this:

$ http +profile @users_userid_get -V offset=10

The request would be:

GET /users/{userId}?offset=10

When called with no variables, then it wouldn't do anything, like the following:

$ http +profile @users_userid_get

It would executed this:

GET /users/{userId}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions