Setting server variables
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 697
- Forks
- 31
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 10
Description
Some services have different subdomains for different clients. e.g. https://{workspace}.example.org. This is addressed by variables.
At the moment, setting variables is only possible via the .server() function call. However, there are a few problems.
- The server base URL must match that of one of the existing servers, as per https://github.com/readmeio/api/issues/921. This means the user has to reconstruct the pattern (
https://{workspace}.example.org) from the spec. - The call is silently ignored if the URL does not match.
I noticed there is also a bug in the latest stable release that server #0 was also skipped. This was changed in the main branch, but I have not been able to test the beta release.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the .server() call and how server variables are matched against existing server base URLs. Review the main-branch change related to server #0 and compare it with the latest stable release; done should include reliable variable setting without silent URL mismatches and coverage for the server #0 case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, typescript
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100