args-api 0.1.0

Shared API contract types and endpoint definitions for args.
Documentation

args-api

Shared API contract for args — resource types and endpoint definitions used by the args backend, CLI, and frontend.

Published primarily so that args-cli can be installed via cargo install. Most users will not depend on this crate directly.

What's in here

  • resource/ — Serializable response types (UserResource, RepositoryResource, ReviewResource, etc.).
  • endpoint/ — Zero-sized types implementing the Endpoint trait, pairing an HTTP method and path with request/response types.
  • Core traitsApiResource, ApiRequest, and Endpoint, plus #[derive(ApiResource)] / #[derive(ApiRequest)] from the companion args-api-derive crate.

Example

use args_api::endpoint::user::GetUser;
use args_api::Endpoint;

assert_eq!(GetUser::PATH, "/user");
assert_eq!(GetUser::METHOD, http::Method::GET);

License

Licensed under the Apache License, Version 2.0. Copyright © args contributors.