Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Meta Issue]: OpenAPI Support #17482

Open
10 of 20 tasks
sennyeya opened this issue Apr 21, 2023 · 11 comments
Open
10 of 20 tasks

[Meta Issue]: OpenAPI Support #17482

sennyeya opened this issue Apr 21, 2023 · 11 comments
Labels
area:openapi-tooling Related to the OpenAPI Tooling Project Area enhancement New feature or request help wanted Help/Contributions wanted from community members will-fix We will fix this at some point

Comments

@sennyeya
Copy link
Contributor

sennyeya commented Apr 21, 2023

馃敄 Feature description

This is a collection of issues stemming from #2566. The goal of this ticket is to break apart the different types of work from that original ticket into separate camps and define a clearer roadmap for OpenAPI support in Backstage.

What do you mean by OpenAPI support in Backstage?

This can mean a multitude of things, which is partially why we want to replace the old ticket. Here it will mean

  1. OpenAPI specs for plugins.
  2. An OpenAPI spec-first developer experience, using the spec to drive server-side code writing.
  3. A Backstage-only client generated using the spec.
  4. Other language clients like Java, Python for interfacing with Backstage plugins.
  5. new API fuzzing of OpenAPI documented plugins

Plugin Specs

OpenAPI Specification Updates

  • Add links to existing specs.
  • Figure out how to deduplicate refs to common properties (Entity, User, etc)

Spec-first Development

Internal Client Autogeneration

Additional Client Autogeneration

  • Support for additional languages
    • Java
    • Python
    • Typescript

API Fuzzing

Context:

Open Questions

  • Should we have a single monolithic client that includes all plugins and specs or should each plugin have its own autogenerated client?

Others

@sennyeya sennyeya added the enhancement New feature or request label Apr 21, 2023
@freben freben added the will-fix We will fix this at some point label Apr 21, 2023
@sennyeya
Copy link
Contributor Author

Also, found this library for jest that adds spec validation into the responses, https://github.com/openapi-library/OpenAPIValidators/tree/master/packages/jest-openapi#readme. Would be useful for verifying response values in test cases as a precursor to turning on validateResponses in the middleware.

@dannysheridan
Copy link

dannysheridan commented May 31, 2023

@sennyeya as you think about the client autogeneration, you ought to check out Fern

@sennyeya sennyeya added the area:openapi-tooling Related to the OpenAPI Tooling Project Area label Jun 6, 2023
@Rugvip
Copy link
Member

Rugvip commented Jun 8, 2023

@dannysheridan apart from discussion on the technical solution, this part of the experience is a blocker for us to adopt Fern as a default tool in the Backstage OSS project:

image

@dsinghvi
Copy link

dsinghvi commented Jun 8, 2023

@dannysheridan apart from discussion on the technical solution, this part of the experience is a blocker for us to adopt Fern as a default tool in the Backstage OSS project:

image

@Rugvip we can add a --skip-login option on init/generate. Would that unblock adopting fern? (So far enforcing login has been great for analytics/support but I see why that's extremely limiting in an OSS project).

@Rugvip
Copy link
Member

Rugvip commented Jun 13, 2023

@dsinghvi If login is not required and there are no usage limitations for the core use-cases we're likely at a point where we wouldn't dismiss it. We'd still ofc need to evaluate whether it's a desirable solution and what level of lock-in there is.

@dannysheridan
Copy link

@Rugvip at Fern, we're going to make login not required if you download files locally. There would be no usage limitations for the core use-cases. Are you up to hop on a call to discuss further? here's my cal

@Stranger6667
Copy link

@sennyeya if you need anything from the Schemathesis side, feel free to tag me and I鈥檒l be happy to provide support on integrating it :)

@sennyeya
Copy link
Contributor Author

@Stranger6667 That was quick! Will definitely keep you in the loop as I start exploring. Thanks for the great tool!

@sennyeya sennyeya added the help wanted Help/Contributions wanted from community members label Oct 27, 2023
@vinzscam
Copy link
Member

vinzscam commented Jan 23, 2024

hey have we considered finding a way to avoid running the openapi generate-client script when developing?

I felt the pain of writing yaml, then running a script to generate a .ts file which is then consumed by our typescript bundler.
I found the process really slow and is yet another thing that contributors need to learn before contributing to Backstage.

I would love to just write the openapi definition in typescript instead.

@sennyeya
Copy link
Contributor Author

@vinzscam Reached out via DM, happy to help but I'd like a little more info on your use case.

@vinzscam
Copy link
Member

@vinzscam Reached out via DM, happy to help but I'd like a little more info on your use case.

nothing fancy I am just developing a plugin which integrates with OpenAPI and found the process a bit complicated 馃槄

I'm thinking that writing the definition directly in typescript (for example by using some zod to openapi library) might simplify the development process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:openapi-tooling Related to the OpenAPI Tooling Project Area enhancement New feature or request help wanted Help/Contributions wanted from community members will-fix We will fix this at some point
Projects
None yet
Development

No branches or pull requests

7 participants