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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local mocking from the CLI #491

Closed
5 tasks done
crjones opened this issue Jun 23, 2022 · 5 comments · Fixed by kubeshop/kusk#50
Closed
5 tasks done

Local mocking from the CLI #491

crjones opened this issue Jun 23, 2022 · 5 comments · Fixed by kubeshop/kusk#50

Comments

@crjones
Copy link
Contributor

crjones commented Jun 23, 2022

As an API developer, I want to spin up a mock API server on the CLI using an OpenAPI spec.

  • Parse OpenAPI Spec
  • Initialise mock server with routes and responses.
  • If a route+method has example responses, use them, else generate content that matches the content schema
  • React to changes to the input file, re-parsing and reinitialising the mocking server

Cosmetic:

  • stream access logs from mocked server to stdout
@fivenp
Copy link
Collaborator

fivenp commented Jun 28, 2022

From a ux perspective this would be an amazing flow for the user

image

@fivenp
Copy link
Collaborator

fivenp commented Jun 28, 2022

Since we watch the spec file for changes we can clear the message and show:

  1. Potential errors:
    image

  2. Successful re-parsing and a request log (potentially with headers / body if verbose mode is enabled?)
    image

@crjones
Copy link
Contributor Author

crjones commented Jun 28, 2022

Love these mocks. I came to this issue to do just this and you already did it and WAY better!

@kylehodgetts kylehodgetts added this to the 1.2.0 milestone Jul 4, 2022
@kylehodgetts kylehodgetts self-assigned this Jul 4, 2022
@aabedraba
Copy link
Contributor

Basic functionality is working, and ready for demo.
Using https://github.com/muonsoft/openapi-mock

@aabedraba
Copy link
Contributor

Team Sync: issue missing on relative and absolute paths, to be worked on

Next will be documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants