File tree Expand file tree Collapse file tree
openapi-ts/src/plugins/zod Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -721,6 +721,11 @@ export const zModelWithNullableObject = z.object({
721721 data : z . optional ( zNullableObject )
722722} ) ;
723723
724+ /**
725+ * An object with additional properties that can be null
726+ */
727+ export const zModelWithAdditionalPropertiesRef = z . record ( z . string ( ) , z . nullable ( zNullableObject ) ) ;
728+
724729export const zModelWithOneOfEnum = z . union ( [
725730 z . object ( {
726731 foo : z . enum ( [ 'Bar' ] )
Original file line number Diff line number Diff line change @@ -721,6 +721,11 @@ export const zModelWithNullableObject = z.object({
721721 data : zNullableObject . optional ( )
722722} ) ;
723723
724+ /**
725+ * An object with additional properties that can be null
726+ */
727+ export const zModelWithAdditionalPropertiesRef = z . record ( zNullableObject . nullable ( ) ) ;
728+
724729export const zModelWithOneOfEnum = z . union ( [
725730 z . object ( {
726731 foo : z . enum ( [ 'Bar' ] )
Original file line number Diff line number Diff line change @@ -721,6 +721,11 @@ export const zModelWithNullableObject = z.object({
721721 data : zNullableObject . optional ( )
722722} ) ;
723723
724+ /**
725+ * An object with additional properties that can be null
726+ */
727+ export const zModelWithAdditionalPropertiesRef = z . record ( z . string ( ) , zNullableObject . nullable ( ) ) ;
728+
724729export const zModelWithOneOfEnum = z . union ( [
725730 z . object ( {
726731 foo : z . enum ( [ 'Bar' ] )
Original file line number Diff line number Diff line change @@ -721,6 +721,11 @@ export const zModelWithNullableObject = z.object({
721721 data : z . optional ( zNullableObject )
722722} ) ;
723723
724+ /**
725+ * An object with additional properties that can be null (anyOf ref + null)
726+ */
727+ export const zModelWithAdditionalPropertiesRef = z . record ( z . string ( ) , z . nullable ( zNullableObject ) ) ;
728+
724729export const zModelWithOneOfEnum = z . union ( [
725730 z . object ( {
726731 foo : z . enum ( [ 'Bar' ] )
Original file line number Diff line number Diff line change @@ -721,6 +721,11 @@ export const zModelWithNullableObject = z.object({
721721 data : zNullableObject . optional ( )
722722} ) ;
723723
724+ /**
725+ * An object with additional properties that can be null (anyOf ref + null)
726+ */
727+ export const zModelWithAdditionalPropertiesRef = z . record ( zNullableObject . nullable ( ) ) ;
728+
724729export const zModelWithOneOfEnum = z . union ( [
725730 z . object ( {
726731 foo : z . enum ( [ 'Bar' ] )
Original file line number Diff line number Diff line change @@ -721,6 +721,11 @@ export const zModelWithNullableObject = z.object({
721721 data : zNullableObject . optional ( )
722722} ) ;
723723
724+ /**
725+ * An object with additional properties that can be null (anyOf ref + null)
726+ */
727+ export const zModelWithAdditionalPropertiesRef = z . record ( z . string ( ) , zNullableObject . nullable ( ) ) ;
728+
724729export const zModelWithOneOfEnum = z . union ( [
725730 z . object ( {
726731 foo : z . enum ( [ 'Bar' ] )
Original file line number Diff line number Diff line change @@ -721,6 +721,11 @@ export const zModelWithNullableObject = z.object({
721721 data : z . optional ( zNullableObject )
722722} ) ;
723723
724+ /**
725+ * An object with additional properties that can be null
726+ */
727+ export const zModelWithAdditionalPropertiesRef = z . record ( z . string ( ) , z . nullable ( zNullableObject ) ) ;
728+
724729export const zModelWithOneOfEnum = z . union ( [
725730 z . object ( {
726731 foo : z . enum ( [ 'Bar' ] )
Original file line number Diff line number Diff line change @@ -721,6 +721,11 @@ export const zModelWithNullableObject = z.object({
721721 data : zNullableObject . optional ( )
722722} ) ;
723723
724+ /**
725+ * An object with additional properties that can be null
726+ */
727+ export const zModelWithAdditionalPropertiesRef = z . record ( zNullableObject . nullable ( ) ) ;
728+
724729export const zModelWithOneOfEnum = z . union ( [
725730 z . object ( {
726731 foo : z . enum ( [ 'Bar' ] )
Original file line number Diff line number Diff line change @@ -721,6 +721,11 @@ export const zModelWithNullableObject = z.object({
721721 data : zNullableObject . optional ( )
722722} ) ;
723723
724+ /**
725+ * An object with additional properties that can be null
726+ */
727+ export const zModelWithAdditionalPropertiesRef = z . record ( z . string ( ) , zNullableObject . nullable ( ) ) ;
728+
724729export const zModelWithOneOfEnum = z . union ( [
725730 z . object ( {
726731 foo : z . enum ( [ 'Bar' ] )
Original file line number Diff line number Diff line change @@ -721,6 +721,11 @@ export const zModelWithNullableObject = z.object({
721721 data : z . optional ( zNullableObject )
722722} ) ;
723723
724+ /**
725+ * An object with additional properties that can be null (anyOf ref + null)
726+ */
727+ export const zModelWithAdditionalPropertiesRef = z . record ( z . string ( ) , z . nullable ( zNullableObject ) ) ;
728+
724729export const zModelWithOneOfEnum = z . union ( [
725730 z . object ( {
726731 foo : z . enum ( [ 'Bar' ] )
You can’t perform that action at this time.
0 commit comments