clearlydefined / clearlydefined/service

The preview API doesn't apply the correct facets if the object has empty arrays

Open
#456 2 comments 1 reaction 0 assignees View on GitHub
bug reproducible
Dominant language
TypeScript
Stars
51
Forks
46
PR merge metrics
No merged PRs in 30d

Description

e.g. definition
https://dev.clearlydefined.io/definitions/git/github/automattic/mongoose/1ead0e616ab028a994ab47a23643749659243e07

add 2 globs (e.g.`**/docs/*`) to the **dev** and **data** facets. This will make the following API call:

```
https://dev-api.clearlydefined.io/definitions/git/github/automattic/mongoose/1ead0e616ab028a994ab47a23643749659243e07?preview=true

{"described":{"facets":{"data":["**/docs/*"],"dev":["**/docs/*"]}}}
```

Remove the blob on the **dev** facet and the body for the API call will be:

```json
{"described":{"facets":{"data":["**/docs/*"],"dev":[]}}}
```

In the response none of the files under the _docs_ folder have either facet applied to it

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.