clearlydefined / clearlydefined/service

Finding definitions, omitting version information

Open
#796 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
51
Forks
46
PR merge metrics
No merged PRs in 30d

Description

Just found ClearlyDefined and started using it. Thank you to all contributors for this awesome service.

I found that when searching for definitions, and omitting version information, I get an 404 response. For example I tried the endpoint:
https://api.clearlydefined.io/definitions/npm/npmjs/-/jquery/3.3.1
with a successful response.

However when omitting the revision like:
https://api.clearlydefined.io/definitions/npm/npmjs/-/jquery/
I get an 404 response.

Reading the documentation I https://docs.clearlydefined.io/using-data, I guess that this behavior is not intended? The docs states you should be able to omit the revision and get the latest revision in response.

So, I'm unsure if this behavior is intended or if there is a bug. Anyways, I believe omitting the revision is a good feature.

Please tell me if you want me to provide any additional information. I would be happy to help with the implementation.

Contributor guide

Open the contributing guide

Research direction

Start with the documented behavior at https://docs.clearlydefined.io/using-data and compare it with the two example requests in the issue. Check how the definitions endpoint handles a missing revision; done means the revision can be omitted and the latest revision is returned, as the documentation describes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.