TryGhost / TryGhost/SDK

Add $ref resolution to JSON schemas

Open
#347 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
134
Forks
87
Avg merge
12m
Merged PRs (30d)
25

Description

Problem

admin-api-schema's get() method returns raw json schemas without resolving definitions used in $ref. This makes get method hardly usable if somebody needs to see whole schema (for example when used in documentation). More on this read this comment.

Solution

One of possible solutions could be adding $ref resolution through package like ref-parser. But more research should be done into use-cases and other solutions first

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/admin-api-schema/lib/index.js around the get() method and review the linked comment for current schema behavior. Research the stated use cases and compare $ref resolution options, including ref-parser. Done means get() provides whole schemas with definitions resolved and the chosen behavior is covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api
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.