loopbackio / loopbackio/loopback-next
OpenAPI shema definition for models should exclude hidden properties by default
@jannyHou is already working on this.
Since Jan 25, 2020.
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1.1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 27
Description
Hidden properties are automatically removed from the response data (model's toJSON() excludes the hidden properties), so it seems that the schema definition should also exclude these fields by default. Currently, one has to manually add these fields to the "exclude" option in getModelSchemaRef()
Current behavior: hidden properties are removed from response data but openapi schema definition lists hidden properties in the schema.
Expected behavior: hidden properties are removed from response data and openapi schema definition does not list hidden properties.
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.
Assessment
This issue has not been assessed yet.