@accelbyte/codegen 2.0.0-beta.7 → 2.0.0-beta.9

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.
@@ -772,7 +772,13 @@ ${exportedTypeString}
772
772
  const schemaAttribute = name ? `'${name}':` : "";
773
773
  const typeAttribute = name ? `'${name}'${typeRequired}:` : "";
774
774
  const type = definition?.type;
775
- if (type) {
775
+ if (definition.properties) {
776
+ const result = this.parseToZodSchema(definition, requiredAttrs);
777
+ return {
778
+ schemaString: `${schemaAttribute} ${result.schemaString}${schemaRequired}`,
779
+ typeString: `${typeAttribute} ${result.typeString}${typeNullishability}`
780
+ };
781
+ } else if (type) {
776
782
  if (type === "object" && definition.additionalProperties) {
777
783
  const zodAttribute = this.parseToZodAttribute("", definition.additionalProperties, [""]);
778
784
  return {
@@ -848,12 +854,6 @@ ${exportedTypeString}
848
854
  typeString: `${typeAttribute} ${result.typeString}`
849
855
  };
850
856
  }
851
- } else if (definition.properties) {
852
- const result = this.parseToZodSchema(definition, requiredAttrs);
853
- return {
854
- schemaString: `${schemaAttribute} ${result.schemaString}${schemaRequired}`,
855
- typeString: `${typeAttribute} ${result.typeString}${typeNullishability}`
856
- };
857
857
  }
858
858
  const ref = definition.$ref;
859
859
  let model = `z.record(z.any())`;