Skip to content

[feature proposal] OpenAPI Spec Generator #149

@serranoio

Description

@serranoio

Do you know what the flying f**** comes through your API? Find out with this proposal!

Have wiretap live as a proxy and it will build an OpenAPI spec for you.

Inititial proposal

  1. Every http request proxied will have a new endpoint added in the spec (with everything added of course). It will have its response & request data added as examples.
  2. Any time the same endpoint encounters a different shape of data coming into the same endpoint, it will add the oneOf statement.
  3. Any time the same endpoint encounters the same shape of data, it will simply add another example.

Architecture

create NewSpecGeneratorService() and have wiretap build an OpenAPI spec for you as a proxy. It will send the built spec to the UI

The UI

Want to include a button on top that opens the generated spec in a drawer.

Out of scope

I do not plan on optimizing the spec.

  1. if there are multiple endpoints which return the same datatype, you can consolidate them into one datatype.

Questions

Vacuum fits in here somehow. Don't know how yet.
For part 3 of the initial proposal, I would love to include oneOf on the schema level & oneOf on the data type level
but don't know how to differentiate. (this is more so something I need to figure out myself)

In Scope

The initial proposal is all in scope. Of course, it will be fully tested so you can see exactly what I mean

Comments

This is all I need. Havent thought of anything more since I just thought of this today. Will come back and add on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions