@rvoh/psychic 0.34.3 → 0.34.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -292,21 +292,9 @@ Error: ${this.serializerClass.name} missing explicit serializer definition for $
292
292
  ...(finalOutputForSerializerKey.required || []),
293
293
  association.field,
294
294
  ]);
295
- switch (association.type) {
296
- case 'RendersMany':
297
- anyOf.push({
298
- type: 'array',
299
- items: {
300
- $ref: `#/components/schemas/${associatedSerializerKey}`,
301
- },
302
- });
303
- break;
304
- case 'RendersOne':
305
- anyOf.push({
306
- $ref: `#/components/schemas/${associatedSerializerKey}`,
307
- });
308
- break;
309
- }
295
+ anyOf.push({
296
+ $ref: `#/components/schemas/${associatedSerializerKey}`,
297
+ });
310
298
  const associatedSchema = new OpenapiSerializerRenderer({
311
299
  openapiName: this.openapiName,
312
300
  controllerClass: this.controllerClass,
@@ -318,9 +306,23 @@ Error: ${this.serializerClass.name} missing explicit serializer definition for $
318
306
  }).parse();
319
307
  finalOutput = { ...finalOutput, ...associatedSchema };
320
308
  });
321
- finalOutput[serializerKey].properties[association.field] = {
322
- anyOf,
323
- };
309
+ switch (association.type) {
310
+ case 'RendersMany':
311
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
312
+ ;
313
+ finalOutput[serializerKey].properties[association.field] = {
314
+ type: 'array',
315
+ items: { anyOf },
316
+ };
317
+ break;
318
+ case 'RendersOne':
319
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
320
+ ;
321
+ finalOutput[serializerKey].properties[association.field] = {
322
+ anyOf,
323
+ };
324
+ break;
325
+ }
324
326
  }
325
327
  return { finalOutput, flattenedPolymorphicSchemas, flattenedPolymorphicAssociation };
326
328
  }
@@ -287,21 +287,9 @@ Error: ${this.serializerClass.name} missing explicit serializer definition for $
287
287
  ...(finalOutputForSerializerKey.required || []),
288
288
  association.field,
289
289
  ]);
290
- switch (association.type) {
291
- case 'RendersMany':
292
- anyOf.push({
293
- type: 'array',
294
- items: {
295
- $ref: `#/components/schemas/${associatedSerializerKey}`,
296
- },
297
- });
298
- break;
299
- case 'RendersOne':
300
- anyOf.push({
301
- $ref: `#/components/schemas/${associatedSerializerKey}`,
302
- });
303
- break;
304
- }
290
+ anyOf.push({
291
+ $ref: `#/components/schemas/${associatedSerializerKey}`,
292
+ });
305
293
  const associatedSchema = new OpenapiSerializerRenderer({
306
294
  openapiName: this.openapiName,
307
295
  controllerClass: this.controllerClass,
@@ -313,9 +301,23 @@ Error: ${this.serializerClass.name} missing explicit serializer definition for $
313
301
  }).parse();
314
302
  finalOutput = { ...finalOutput, ...associatedSchema };
315
303
  });
316
- finalOutput[serializerKey].properties[association.field] = {
317
- anyOf,
318
- };
304
+ switch (association.type) {
305
+ case 'RendersMany':
306
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
307
+ ;
308
+ finalOutput[serializerKey].properties[association.field] = {
309
+ type: 'array',
310
+ items: { anyOf },
311
+ };
312
+ break;
313
+ case 'RendersOne':
314
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
315
+ ;
316
+ finalOutput[serializerKey].properties[association.field] = {
317
+ anyOf,
318
+ };
319
+ break;
320
+ }
319
321
  }
320
322
  return { finalOutput, flattenedPolymorphicSchemas, flattenedPolymorphicAssociation };
321
323
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "name": "@rvoh/psychic",
4
4
  "description": "Typescript web framework",
5
- "version": "0.34.3",
5
+ "version": "0.34.4",
6
6
  "author": "RVOHealth",
7
7
  "repository": {
8
8
  "type": "git",