readmeio / readmeio/api

support defaults for required arrays

Open
#748 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:core help wanted
Dominant language
TypeScript
Stars
697
Forks
31
Avg merge
3d 21h
Merged PRs (30d)
10

Description

In cfm/ta-attendance-tools#66, I believe I'm encountering the case not handled in:

https://github.com/readmeio/api/blob/39b966c3f1bdc283e3f4d0e2d50484cfbc7a49a1/packages/core/test/lib/getJSONSchemaDefaults.test.ts#L43

I've taken a stab at this in cfm/api@18115a379d70aa72c5b07e76a93d148e5bb039d8, but doesn't seem to be so straightforward after all. :-) If you can give guidance on how you'd like to see this support implemented, I'd be glad to work on it.

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 with packages/core/test/lib/getJSONSchemaDefaults.test.ts around line 43 and inspect the existing default-handling case. Reproduce the required-array scenario described in the issue, then use the linked attempted change for context. Done means the intended defaults behavior is defined and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.