Skip to content

Conversation

@tomcdonnell
Copy link
Contributor

@tomcdonnell tomcdonnell commented Feb 25, 2025

Overview

This PR corrects the API documentation for the assessments folder filter.

Previously the docs said the folder filter should contain an array like [{"id": integer, "code": string}, ...]
image

After this PR, the docs say the folder filter should contain an array like [{"id": integer}, {"code": string}, ...]
image

Shortcomings of Redocly

Although I think the API specification is correct after this PR, the rendering by Redocly is still not quite correct.

Problem 1:

The rendering by Redocly suggests that the folders array should contain an object that contains nested objects. This structure in not valid JSON. Example:

// Invalid JSON:
folders: [{{"id": 80}, {"code": "9ENGA"}, ...}]

What we really want is 'An array of objects, each of which specifies either an "id" or a "code".' Example:

// Valid JSON:
folders: [{"id": 80}, {"code": "9ENGA"}, ...]

I added a text description of how the array should be structured to clarify. What I've done is the best we can do I think.

Problem 2:

Note the blank orange square above the second option for the folder filter (the object-only option). No number appears in that square because I marked that option as deprecated. I think this is a styling bug in Redocly. Since the styling does not make clear that the option is deprecated, I changed the description to '(Deprecated)'.

@JustinAClarke JustinAClarke merged commit 7286660 into alaress:master Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants