swagger-api / swagger-api/swagger-core
RFC: Improved support for JSONSchema route hosting
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 7.5k
- Forks
- 2.3k
- Avg merge
- 18h 1m
- Merged PRs (30d)
- 10
Description
Problem
I need a JSONSchema URL to type some entity (such as a JSONFile, yaml file), e.g.:
{
"$schema": "https://petstore.com/api/schemas/foo/bar",
"bar": { ... }
}
...but such a standard in the swagger specification doesn't exist.
Without this capability, I cannot enable great features like intellisense in my IDE without first downloading the swagger.json and performing a transformation.
Discussion
- Hosting a dedicated route(s) for supplying raw JSONSchema would be an excellent addition to the core offerring.
- We go to great lengths to build JSONSchema models, but we don't expose them in their natural form.
- JSONSchema likes to be hosted at URIs that produce raw/idiomatic JSONSchema: https://json-schema.org/understanding-json-schema/structuring#schema-identification, which is helpful for integrating with some tools
Desired, example behavior:
curl https://petstore.com/api/schemas/SCHEMA_NAME # or similar
{ # JSONSchema document just for that SCHEMA_NAME
...
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no implementation files, tests, or entry points. Start by reviewing the linked JSON Schema structuring guidance and the existing schema-generation behavior; done means a route such as /api/schemas/SCHEMA_NAME returns the selected schema as raw, idiomatic JSONSchema.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100