Skip to content

Commit df9b0ff

Browse files
ymc9AmruthPillaithomassnielsen
authored
merge dev to main (v2.7.4) (#1808)
Co-authored-by: Amruth Pillai <[email protected]> Co-authored-by: Thomas Sunde Nielsen <[email protected]>
1 parent bb5f290 commit df9b0ff

File tree

23 files changed

+167
-79
lines changed

23 files changed

+167
-79
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zenstack-monorepo",
3-
"version": "2.7.3",
3+
"version": "2.7.4",
44
"description": "",
55
"scripts": {
66
"build": "pnpm -r build",

packages/ide/jetbrains/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
}
1010

1111
group = "dev.zenstack"
12-
version = "2.7.3"
12+
version = "2.7.4"
1313

1414
repositories {
1515
mavenCentral()

packages/ide/jetbrains/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jetbrains",
3-
"version": "2.7.3",
3+
"version": "2.7.4",
44
"displayName": "ZenStack JetBrains IDE Plugin",
55
"description": "ZenStack JetBrains IDE plugin",
66
"homepage": "https://zenstack.dev",

packages/language/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenstackhq/language",
3-
"version": "2.7.3",
3+
"version": "2.7.4",
44
"displayName": "ZenStack modeling language compiler",
55
"description": "ZenStack modeling language compiler",
66
"homepage": "https://zenstack.dev",

packages/misc/redwood/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@zenstackhq/redwood",
33
"displayName": "ZenStack RedwoodJS Integration",
4-
"version": "2.7.3",
4+
"version": "2.7.4",
55
"description": "CLI and runtime for integrating ZenStack with RedwoodJS projects.",
66
"repository": {
77
"type": "git",

packages/plugins/openapi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@zenstackhq/openapi",
33
"displayName": "ZenStack Plugin and Runtime for OpenAPI",
4-
"version": "2.7.3",
4+
"version": "2.7.4",
55
"description": "ZenStack plugin and runtime supporting OpenAPI",
66
"main": "index.js",
77
"repository": {

packages/plugins/openapi/src/rest-generator.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,8 +847,10 @@ export class RESTfulOpenAPIGenerator extends OpenAPIGeneratorBase {
847847

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

853855
const attributes: Record<string, OAPI.SchemaObject> = {};
854856
const relationships: Record<string, OAPI.ReferenceObject | OAPI.SchemaObject> = {};

packages/plugins/openapi/tests/baseline/rest-3.0.0.baseline.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3143,14 +3143,6 @@ components:
31433143
type: string
31443144
attributes:
31453145
type: object
3146-
required:
3147-
- postId
3148-
- userId
3149-
properties:
3150-
postId:
3151-
type: string
3152-
userId:
3153-
type: string
31543146
relationships:
31553147
type: object
31563148
properties:
@@ -3178,13 +3170,6 @@ components:
31783170
type: string
31793171
type:
31803172
type: string
3181-
attributes:
3182-
type: object
3183-
properties:
3184-
postId:
3185-
type: string
3186-
userId:
3187-
type: string
31883173
relationships:
31893174
type: object
31903175
properties:

packages/plugins/openapi/tests/baseline/rest-3.1.0.baseline.yaml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3155,16 +3155,6 @@ components:
31553155
properties:
31563156
type:
31573157
type: string
3158-
attributes:
3159-
type: object
3160-
required:
3161-
- postId
3162-
- userId
3163-
properties:
3164-
postId:
3165-
type: string
3166-
userId:
3167-
type: string
31683158
relationships:
31693159
type: object
31703160
properties:
@@ -3192,13 +3182,6 @@ components:
31923182
type: string
31933183
type:
31943184
type: string
3195-
attributes:
3196-
type: object
3197-
properties:
3198-
postId:
3199-
type: string
3200-
userId:
3201-
type: string
32023185
relationships:
32033186
type: object
32043187
properties:

packages/plugins/swr/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@zenstackhq/swr",
33
"displayName": "ZenStack plugin for generating SWR hooks",
4-
"version": "2.7.3",
4+
"version": "2.7.4",
55
"description": "ZenStack plugin for generating SWR hooks",
66
"main": "index.js",
77
"repository": {

0 commit comments

Comments
 (0)