Repository navigation
feat: endpoints, route-aware plugins and guide-style docs (0.1.0-rc.0) - #4
Merged
Merged
Conversation
- add `client.endpoint("GET /users/:id", definition)` to save a route with its
schemas, headers and plugin overrides, plus the `Endpoint*` and route types
- pass the call's route to plugins as `ctx.route` and `wrap`'s third argument,
and add it to `logger` annotations
- add endpoint and multi-backend examples, tests, type tests and docs
- expand the README Endpoints section with why, when to use them, and how to organize them - add `examples/app/`, a feature-sliced app with shared clients and module-owned endpoints, plus `examples/README.md` - rename `make` to `makeApi` in the examples and docs
- rewrite the intro, add a side-by-side with `HttpClient`, and restructure sections into a two-level table of contents - group content into getting started, clients, calls, errors, plugins, endpoints, structuring an app, testing and reference - note the reorganization in the changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds client.endpoint(route, definition), exposes each call's route to plugins (ctx.route, wrap's third argument, logger's route annotation), and reorganizes the README into a top-to-bottom guide with new examples. See CHANGELOG.md for details. Sets the version to 0.1.0-rc.0 and freezes the API until 0.1.0.