scribe-org / scribe-org/Scribe-Server

Add tests for API route registration

Open
#90 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

-priority- blocked
Dominant language
Go
Stars
12
Forks
14
Avg merge
1d 4h
Merged PRs (30d)
4

Description

Terms
Description
  • Assert all six /api/v1/* routes are registered, unknown paths 404, wrong methods behave as pinned, / serves static/index.html as text/html, and trailing-slash redirects work.

  • Includes a regression test that /swagger/index.html and /docs/index.html both serve — setupSwagger now calls swaggerFiles.NewHandler() twice, and a refactor back to one shared handler reintroduces the prefix collision fixed earlier.

  • An unregistered route returns a clean 404 that looks like a client bug.

Contribution

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating API route registration and setupSwagger, then inspect how static/index.html and the /swagger/index.html and /docs/index.html paths are served. Add regression tests for all six /api/v1/* routes, unknown paths, method behavior, root content type, trailing-slash redirects, and both documentation pages; done means these responses match the issue’s requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.