Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Provide a consistent way of describing the difference between DB schema and request/response #135

Open
@cebe

Description

@cebe

For simple CRUD operations the DB schema often matches the JSON schema of the request response exactly.
However there are a lot of use cases where the schema returned by the API is very different from the API.

Example:

User:
  type: object
  properties:
    id:
      type: integer
    username:
       type: string
       maxLength: 32
    password_hash:
       type: string
       maxLength: 64

For obvious reasons we do not want to expose the password_hash on the API.

Possible solutions:

  1. use readOnly and writeOnly (related to Properties that are marked as readOnly are not read only #4)
  2. use sepearate Schemas for DB and API and find a way to link them together

Metadata

Metadata

Assignees

Labels

generator-featureFunctionality missing from the generator

Projects

Status

🔢 Concept Needed

Relationships

None yet

Development

No branches or pull requests

Issue actions