Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

[STORY] Polish the initial impression of running meeshkan #106

Open
20 of 35 tasks
fornwall opened this issue Mar 9, 2020 · 2 comments
Open
20 of 35 tasks

[STORY] Polish the initial impression of running meeshkan #106

fornwall opened this issue Mar 9, 2020 · 2 comments

Comments

@fornwall
Copy link
Contributor

fornwall commented Mar 9, 2020

This is a collection of tasks that can be done for improving the initial impressions of running meeshkan.

Some possible ones:

For meeshkan record:

  • Some questions that came up for me: If I already have a jsonl file and I go back to record more, does it update or overwrite? Is there any way to overwrite a specific file without deleting and regenerating? These questions could be solved via documentation or code, depending on how the product acts now.
  • One of the first logs says when running says spec generation mode disabled and I was like uhhhh what is this, is it bad 😆 Could be good to clarify for users what this means.
  • It currently doesn't tell you that it has created two directories (logs and specs)
  • Once the initial logs have printed, that's it. There's no helpful logs to reassure you that it's doing anything.
  • If you're using curl or another command-line tool to make requests, it should be done in a separate window because Meeshkan record is a blocking process. We don't mention this anywhere, so it's hard to know that this is what you're supposed to do. (Documented with Docs: Polish initial impression of running Meeshkan #144)
  • How many API calls are "enough"? For the tutorial, we do 33 requests to the Pokemon API - but in general we haven't stress tested this. Is it just the more calls, the more accurate? Or is there a minimum number of calls? Would be good to know.
  • How do you kill the recorder without losing data? Turns out you do ctrl + c or a kill command - but that's not written anywhere. It'd be nice to have that documented or, even better, have a stop command (Documented in Docs: Polish initial impression of running Meeshkan #144, but still in favor of a stop command)
  • Update documentation to reflect recordings filename changes in Update recordings filename. #100 in both RECORD.md and BUILD.md (Docs: Polish initial impression of running Meeshkan #144)
  • Continuously build a schema when recording, and print a line every time the schema is updated due to a recording. That would give an indication when updates are slowing down/stopping, so the further recordings are not needed.

For meeshkan build:

For meeshkan mock:

  • Explain what the -s flag is doing in mock command example in MOCK.md (In meeshkan/meeshkan@608524e we write out --specs-dir)
  • When creating my mock server, I needed to search for the servers field in OpenAPI spec to find the URL for the mock server to respond to. But I only knew to do that because Mike told me to. We should clarify in docs that this is located there and that it will usually be the same url as the API itself, unless you hack it. We haven’t mentioned hackability much in the existing documentation. If we write out the endpoints at startup, then this is less of a problem. See also the next note about logging endpoints at startup. Solved by Log endpoints at startup #142.
  • Log the endpoints at startup ala https://github.com/stoplightio/prism (gif) (Log endpoints at startup #142)
  • We are currently using http://localhost:9000/http://myapi.com/path/to/api, perhaps use http://localhost:9000/path/to/api without the host (that's what prism and mocklab does at least).
  • How do we know that it’s not calling the real API? The host URL is the same. Mock mode never calls the real API - should be specified.
  • Clarify that the default value that the mock command will search in is specs. Or remove the default completely (Removed default in Simplify and enhance mock specs handling #154)
  • It should validate the input --> if it’s an int and you put in a string, we should show an error (Validate mock input data #138).
  • Remove --specs-dir as an option, and instead take it as an argument. So run it like meeshkan mock directory instead of meeshkan mock --specs-dir directory (Simplify and enhance mock specs handling #154) (documented in Docs: Polish initial impression of running Meeshkan #144)
  • Support running on a single schema file as well, like in meeshkan mock file-or-directory (Simplify and enhance mock specs handling #154)

General documentation improvements:

When working on this, let's create links to PR:s and concrete issues to visualise what has been done and ideas for further improvements.

@carolstran
Copy link
Contributor

Added a bunch of suggestions under four different categories: For meeshkan record, For meeshkan build, For meeshkan mock and General documentation improvements.

There are still two bugs that I need to file which will also potentially inform this list. One is related the differences between build modes (gen and replay) and the other is related to meeshkan record recognizing integers in query params.

@fornwall
Copy link
Contributor Author

Things to discuss:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants