Automattic / Automattic/fresh-data

Check api spec inputs

Open
#130 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
JavaScript
Stars
37
Forks
7
PR merge metrics
No merged PRs in 30d

Description

It's pretty easy to return the wrong thing from stuff like operations, so fresh-data should check these types and ensure they are correct and if they're not, throw a more informative exception than the "non-spreadable" type we're sending by default now.

Another option for operations specifically is to allow them to return undefined if they don't have any promises to return. Or to allow them to return a single promise instead of an array.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how API spec inputs and operation return values are handled in fresh-data, focusing on the operations path mentioned in the issue. Clarify whether the intended result is type validation with a more informative exception, support for undefined, support for a single promise, or some combination; done requires an agreed behavior and coverage for the accepted and rejected forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.