Skip to content

Support for omitting @updatedAt ? #4

Closed Answered by m1212e
crishoj asked this question in Q&A
Discussion options

You must be logged in to vote

With your above example I get

export const ItemPlain = Type.Object(
  {
    id: Type.Integer({ additionalProperties: false }),
    createdAt: Type.Date({ additionalProperties: false }),
    updatedAt: Type.Date({ additionalProperties: false }),
    name: Type.String({ additionalProperties: false }),
  },
  { additionalProperties: false },
);

As plain model and

export const ItemPlainInput = Type.Object(
  { name: Type.String({ additionalProperties: false }) },
  { additionalProperties: false },
);

as input model. Please note the rephrase of data models to input models. You might need to check the updated readme and adjust your settings to make the new version work as expected.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@crishoj
Comment options

@m1212e
Comment options

Answer selected by crishoj
@crishoj
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants