Skip to content

Instantly share code, notes, and snippets.

@maslade
Last active March 28, 2021 20:38
Show Gist options
  • Save maslade/818418e96d747c16d10ed43bd6fadc76 to your computer and use it in GitHub Desktop.
Save maslade/818418e96d747c16d10ed43bd6fadc76 to your computer and use it in GitHub Desktop.
// Imports types from the implementation.
import { User } from './api/models/user';
// ... others
// Exports types used in the REST layer - a request/response/both per API operation.
// This naming convention ensures that the name in OpenAPI won't change even if the
// underlying type does.
export type IUpdateUserRequestBody = Partial<User>;
export type IUpdateUserResponseBody = Omit<User, 'Password'>;
// ... others
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment