@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.
@@ -749,7 +749,13 @@ ${exportedTypeString}
749
749
  const schemaAttribute = name ? `'${name}':` : "";
750
750
  const typeAttribute = name ? `'${name}'${typeRequired}:` : "";
751
751
  const type = definition?.type;
752
- if (type) {
752
+ if (definition.properties) {
753
+ const result = this.parseToZodSchema(definition, requiredAttrs);
754
+ return {
755
+ schemaString: `${schemaAttribute} ${result.schemaString}${schemaRequired}`,
756
+ typeString: `${typeAttribute} ${result.typeString}${typeNullishability}`
757
+ };
758
+ } else if (type) {
753
759
  if (type === "object" && definition.additionalProperties) {
754
760
  const zodAttribute = this.parseToZodAttribute("", definition.additionalProperties, [""]);
755
761
  return {
@@ -825,12 +831,6 @@ ${exportedTypeString}
825
831
  typeString: `${typeAttribute} ${result.typeString}`
826
832
  };
827
833
  }
828
- } else if (definition.properties) {
829
- const result = this.parseToZodSchema(definition, requiredAttrs);
830
- return {
831
- schemaString: `${schemaAttribute} ${result.schemaString}${schemaRequired}`,
832
- typeString: `${typeAttribute} ${result.typeString}${typeNullishability}`
833
- };
834
834
  }
835
835
  const ref = definition.$ref;
836
836
  let model = `z.record(z.any())`;