Skip to content

Commit

Permalink
Poke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thomassnielsen committed Oct 23, 2024
1 parent b39b1d1 commit 6a101f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/plugins/openapi/src/rest-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,8 @@ export class RESTfulOpenAPIGenerator extends OpenAPIGeneratorBase {

private generateModelEntity(model: DataModel, mode: 'read' | 'create' | 'update'): OAPI.SchemaObject {
const idFields = model.fields.filter((f) => isIdField(f));
// For compound ids, each component is also exposed as a separate fields for read operations
// For compound ids each component is also exposed as a separate fields for read operations,
// but not required for write operations
const fields =
idFields.length > 1 && mode === 'read' ? model.fields : model.fields.filter((f) => !isIdField(f));

Expand Down

0 comments on commit 6a101f3

Please sign in to comment.