meeshkan / hmt

HTTP Mocking Toolkit
MIT License
52 stars 7 forks source link

Log endpoints at startup #142

Closed fornwall closed 4 years ago

fornwall commented 4 years ago

Also introduce a OpenAPISpecification dataclass containing the API object and source information, instead of sending around a dict mapping from source to API object, and extract the loading of specs out from ResponseMatcher.

Current log output at startup:

$ meeshkan mock --specs-dir tests/serve/mock/schemas/petstore 
Starting admin endpoint on http://localhost:8888/admin
Mock is listening on http://localhost:8000

After this PR:

$ meeshkan mock --specs-dir tests/serve/mock/schemas/petstore 
⚙ Admin   http://localhost:8888/admin
→ GET     http://localhost:8000/http://petstore.swagger.io/pets
→ POST    http://localhost:8000/http://petstore.swagger.io/pets
→ GET     http://localhost:8000/http://petstore.swagger.io/pets/{petId}

In the future I think we should show an admin page at http://localhost:8888/admin, showing: