yoshinorin / qualtet-mock

This project target is create a mock server of Qualtet. It will be used for Quintet's E2E test.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Qualtet mock

CI

This project target is create a mock server of Qualtet. It will be used for Quintet's E2E test.

Requirements

  • rustup 1.27.1
  • rustc 1.81.0
  • cargo-watch (Optional)
  • clippy (Optional: for lint)

Preconditions

Install cargo-watch.

$ cargo install cargo-watch@8.5.2

API Docs

Please see Qualtet's REST API docs instead.

Supported Endpoint

  • /v1/archives
  • /v1/articles
    • /v1/articles?{queryParams}
  • /v1/contents/articles/standard/: Standard post (not nested).
  • /v1/contents/articles/nested/standard/: Standard post.
    • /v1/contents/articles/nested/empty-robots/: robotesAttrobutes are empty post.
    • /v1/contents/articles/nested/empty-tags/: tags are empty post.
    • /v1/contents/articles/nested/partially-robots/: with partially robotesAttrobutes post.
    • /v1/contents/articles/nested/with-externalresources/: With externalResources post.
    • /v1/contents/articles/nested/without-robots/: without robotesAttrobutes post.
    • /v1/contents/articles/nested/without-tags/: Without tags post.
  • /v1/feeds/index
  • /v1/search
  • /v1/series
    • /v1/series/{seriesName}
  • /v1/sitemaps/
  • /v1/system/health
  • /v1/system/metadata
  • /v1/tags
    • /v1/tags/{tagName}
    • /v1/tags/{tagName}?{queryParams}

Docker Support

Qualtet-mock provides docker image. Please see GitHub Container Repository.

Run local server

After running the command, a local server starts at http://localhost:9002.

// with auto-reload
$ cargo watch -w src -x run

// without auto-reload
$ cargo run

Code format

$ cargo fmt

Docker

How to build.

// with cache
$ docker build . --progress=plain
// without cache
$ docker build . --progress=plain --no-cache

LICENSE

This code is open source software licensed under the Apache 2.0 License.

About

This project target is create a mock server of Qualtet. It will be used for Quintet's E2E test.

License:Apache License 2.0


Languages

Language:Rust 91.9%Language:Dockerfile 6.7%Language:Makefile 1.4%