Skip to content

Commit 1dfdeb3

Browse files
author
Dan Fithian
committed
Make shortening single-field objects configurable because it doesn't work 100% of the time.
1 parent f115133 commit 1dfdeb3

File tree

8 files changed

+68
-53
lines changed

8 files changed

+68
-53
lines changed

openapi3-code-generator/src/OpenAPI/Generate/Model.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,10 +624,13 @@ defineObjectModelForSchema strategy schemaName schema =
624624
name = haskellifyName convertToCamelCase True schemaName
625625
required = OAS.schemaObjectRequired schema
626626
fixedValueStrategy = OAO.settingFixedValueStrategy settings
627+
shortenSingleFieldObjects = OAO.settingShortenSingleFieldObjects settings
627628
(props, propsWithFixedValues) = extractPropertiesWithFixedValues fixedValueStrategy required $ Map.toList $ OAS.schemaObjectProperties schema
628629
propSuffix = OAO.settingPropertyTypeSuffix settings
629630
propFields = case props of
630-
[(propName, subschema)] -> [(propName, toField convertToCamelCase propName (schemaName <> propSuffix) subschema required)]
631+
[(propName, subschema)]
632+
| shortenSingleFieldObjects ->
633+
[(propName, toField convertToCamelCase propName (schemaName <> propSuffix) subschema required)]
631634
_ -> flip fmap props $ \(propName, subschema) ->
632635
(propName, toField convertToCamelCase propName (schemaName <> uppercaseFirstText propName <> propSuffix) subschema required)
633636
emptyCtx = pure []

openapi3-code-generator/src/OpenAPI/Generate/OptParse.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ data Settings = Settings
110110
-- in the 'FromJSON' instance.
111111
-- This setting allows to change this behavior by including all fixed value
112112
-- fields instead ("include" strategy), i.e. just not trying to do anything smart.
113-
settingFixedValueStrategy :: !FixedValueStrategy
113+
settingFixedValueStrategy :: !FixedValueStrategy,
114+
-- | When encountering an object with a single field, shorten the field of that object to be the
115+
-- schema name. Respects property type suffix.
116+
settingShortenSingleFieldObjects :: !Bool
114117
}
115118
deriving (Show, Eq)
116119

@@ -157,6 +160,7 @@ combineToSettings Flags {..} mConf configurationFilePath = do
157160
settingWhiteListedSchemas = fromMaybe [] $ flagWhiteListedSchemas <|> mc configWhiteListedSchemas
158161
settingOutputAllSchemas = fromMaybe False $ flagOutputAllSchemas <|> mc configOutputAllSchemas
159162
settingFixedValueStrategy = fromMaybe FixedValueStrategyExclude $ flagFixedValueStrategy <|> mc configFixedValueStrategy
163+
settingShortenSingleFieldObjects = fromMaybe False $ flagShortenSingleFieldObjects <|> mc configShortenSingleFieldObjects
160164

161165
pure Settings {..}
162166
where

openapi3-code-generator/src/OpenAPI/Generate/OptParse/Configuration.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ data Configuration = Configuration
4949
configOpaqueSchemas :: !(Maybe [Text]),
5050
configWhiteListedSchemas :: !(Maybe [Text]),
5151
configOutputAllSchemas :: !(Maybe Bool),
52-
configFixedValueStrategy :: !(Maybe FixedValueStrategy)
52+
configFixedValueStrategy :: !(Maybe FixedValueStrategy),
53+
configShortenSingleFieldObjects :: !(Maybe Bool)
5354
}
5455
deriving stock (Show, Eq)
5556
deriving (FromJSON, ToJSON) via (Autodocodec Configuration)
@@ -91,6 +92,7 @@ instance HasCodec Configuration where
9192
<*> optionalField "whiteListedSchemas" "A list of schema names (exactly as they are named in the components.schemas section of the corresponding OpenAPI 3 specification) which need to be generated. For all other schemas only a type alias to 'Aeson.Value' is created." .= configWhiteListedSchemas
9293
<*> optionalField "outputAllSchemas" "Output all component schemas" .= configOutputAllSchemas
9394
<*> optionalField "fixedValueStrategy" "In OpenAPI 3, fixed values can be defined as an enum with only one allowed value. If such a constant value is encountered as a required property of an object, the generator excludes this property by default ('exclude' strategy) and adds the value in the 'ToJSON' instance and expects the value to be there in the 'FromJSON' instance. This setting allows to change this behavior by including all fixed value fields instead ('include' strategy), i.e. just not trying to do anything smart." .= configFixedValueStrategy
95+
<*> optionalField "shortenSingleFieldObjects" "When encountering an object with a single field, shorten the field of that object to be the schema name. Respects property type suffix." .= configShortenSingleFieldObjects
9496

9597
getConfiguration :: Text -> IO (Maybe Configuration)
9698
getConfiguration path = resolveFile' (T.unpack path) >>= readYamlConfigFile

openapi3-code-generator/src/OpenAPI/Generate/OptParse/Flags.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ data Flags = Flags
4646
flagOpaqueSchemas :: !(Maybe [Text]),
4747
flagWhiteListedSchemas :: !(Maybe [Text]),
4848
flagOutputAllSchemas :: !(Maybe Bool),
49-
flagFixedValueStrategy :: !(Maybe FixedValueStrategy)
49+
flagFixedValueStrategy :: !(Maybe FixedValueStrategy),
50+
flagShortenSingleFieldObjects :: !(Maybe Bool)
5051
}
5152
deriving (Show, Eq)
5253

@@ -87,6 +88,7 @@ parseFlags =
8788
<*> parseFlagWhiteListedSchemas
8889
<*> parseFlagOutputAllSchemas
8990
<*> parseFlagFixedValueStrategy
91+
<*> parseFlagShortenSingleFieldObjects
9092

9193
parseFlagConfiguration :: Parser (Maybe Text)
9294
parseFlagConfiguration =
@@ -382,3 +384,7 @@ parseFlagFixedValueStrategy =
382384
help "In OpenAPI 3, fixed values can be defined as an enum with only one allowed value. If such a constant value is encountered as a required property of an object, the generator excludes this property by default ('exclude' strategy) and adds the value in the 'ToJSON' instance and expects the value to be there in the 'FromJSON' instance. This setting allows to change this behavior by including all fixed value fields instead ('include' strategy), i.e. just not trying to do anything smart (default: 'exclude').",
383385
long "fixed-value-strategy"
384386
]
387+
388+
parseFlagShortenSingleFieldObjects :: Parser (Maybe Bool)
389+
parseFlagShortenSingleFieldObjects =
390+
booleanFlag "When encountering an object with a single field, shorten the field of that object to be the schema name. Respects property type suffix." "shorten-single-field-objects" Nothing

testing/golden-output/src/OpenAPI/Types/CoverType.hs

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -45,50 +45,50 @@ import {-# SOURCE #-} OpenAPI.Types.Value
4545
--
4646
data CoverType = CoverType {
4747
-- | cover
48-
coverType :: (GHC.Maybe.Maybe CoverTypeVariants)
48+
coverTypeCover :: (GHC.Maybe.Maybe CoverTypeCoverVariants)
4949
} deriving (GHC.Show.Show
5050
, GHC.Classes.Eq)
5151
instance Data.Aeson.Types.ToJSON.ToJSON CoverType
52-
where {toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("cover" Data.Aeson.Types.ToJSON..=)) (coverType obj) : GHC.Base.mempty));
53-
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("cover" Data.Aeson.Types.ToJSON..=)) (coverType obj) : GHC.Base.mempty)))}
52+
where {toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("cover" Data.Aeson.Types.ToJSON..=)) (coverTypeCover obj) : GHC.Base.mempty));
53+
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (Data.Maybe.maybe GHC.Base.mempty (GHC.Base.pure GHC.Base.. ("cover" Data.Aeson.Types.ToJSON..=)) (coverTypeCover obj) : GHC.Base.mempty)))}
5454
instance Data.Aeson.Types.FromJSON.FromJSON CoverType
5555
where {parseJSON = Data.Aeson.Types.FromJSON.withObject "CoverType" (\obj -> GHC.Base.pure CoverType GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..:! "cover"))}
5656
-- | Create a new 'CoverType' with all required fields.
5757
mkCoverType :: CoverType
58-
mkCoverType = CoverType{coverType = GHC.Maybe.Nothing}
58+
mkCoverType = CoverType{coverTypeCover = GHC.Maybe.Nothing}
5959
-- | Defines the oneOf schema located at @components.schemas.CoverType.properties.cover.oneOf@ in the specification.
6060
--
6161
--
62-
data CoverTypeVariants =
63-
CoverTypePetByAge PetByAge
64-
| CoverTypeMischling Mischling
65-
| CoverTypeTest Test
66-
| CoverTypeTest2 Test2
67-
| CoverTypeTest3 Test3
68-
| CoverTypeTest4 Test4
69-
| CoverTypeTest5 Test5
70-
| CoverTypeTest6 Test6
71-
| CoverTypeTest7 Test7
72-
| CoverTypeTest8 Test8
73-
| CoverTypeTest9 Test9
74-
| CoverTypeTest10 Test10
75-
| CoverTypeValue Value
62+
data CoverTypeCoverVariants =
63+
CoverTypeCoverPetByAge PetByAge
64+
| CoverTypeCoverMischling Mischling
65+
| CoverTypeCoverTest Test
66+
| CoverTypeCoverTest2 Test2
67+
| CoverTypeCoverTest3 Test3
68+
| CoverTypeCoverTest4 Test4
69+
| CoverTypeCoverTest5 Test5
70+
| CoverTypeCoverTest6 Test6
71+
| CoverTypeCoverTest7 Test7
72+
| CoverTypeCoverTest8 Test8
73+
| CoverTypeCoverTest9 Test9
74+
| CoverTypeCoverTest10 Test10
75+
| CoverTypeCoverValue Value
7676
deriving (GHC.Show.Show, GHC.Classes.Eq)
77-
instance Data.Aeson.Types.ToJSON.ToJSON CoverTypeVariants
78-
where {toJSON (CoverTypePetByAge a) = Data.Aeson.Types.ToJSON.toJSON a;
79-
toJSON (CoverTypeMischling a) = Data.Aeson.Types.ToJSON.toJSON a;
80-
toJSON (CoverTypeTest a) = Data.Aeson.Types.ToJSON.toJSON a;
81-
toJSON (CoverTypeTest2 a) = Data.Aeson.Types.ToJSON.toJSON a;
82-
toJSON (CoverTypeTest3 a) = Data.Aeson.Types.ToJSON.toJSON a;
83-
toJSON (CoverTypeTest4 a) = Data.Aeson.Types.ToJSON.toJSON a;
84-
toJSON (CoverTypeTest5 a) = Data.Aeson.Types.ToJSON.toJSON a;
85-
toJSON (CoverTypeTest6 a) = Data.Aeson.Types.ToJSON.toJSON a;
86-
toJSON (CoverTypeTest7 a) = Data.Aeson.Types.ToJSON.toJSON a;
87-
toJSON (CoverTypeTest8 a) = Data.Aeson.Types.ToJSON.toJSON a;
88-
toJSON (CoverTypeTest9 a) = Data.Aeson.Types.ToJSON.toJSON a;
89-
toJSON (CoverTypeTest10 a) = Data.Aeson.Types.ToJSON.toJSON a;
90-
toJSON (CoverTypeValue a) = Data.Aeson.Types.ToJSON.toJSON a}
91-
instance Data.Aeson.Types.FromJSON.FromJSON CoverTypeVariants
92-
where {parseJSON val = case (CoverTypePetByAge Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeMischling Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeTest Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeTest2 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeTest3 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeTest4 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeTest5 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeTest6 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeTest7 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeTest8 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeTest9 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeTest10 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeValue Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched")))))))))))) of
77+
instance Data.Aeson.Types.ToJSON.ToJSON CoverTypeCoverVariants
78+
where {toJSON (CoverTypeCoverPetByAge a) = Data.Aeson.Types.ToJSON.toJSON a;
79+
toJSON (CoverTypeCoverMischling a) = Data.Aeson.Types.ToJSON.toJSON a;
80+
toJSON (CoverTypeCoverTest a) = Data.Aeson.Types.ToJSON.toJSON a;
81+
toJSON (CoverTypeCoverTest2 a) = Data.Aeson.Types.ToJSON.toJSON a;
82+
toJSON (CoverTypeCoverTest3 a) = Data.Aeson.Types.ToJSON.toJSON a;
83+
toJSON (CoverTypeCoverTest4 a) = Data.Aeson.Types.ToJSON.toJSON a;
84+
toJSON (CoverTypeCoverTest5 a) = Data.Aeson.Types.ToJSON.toJSON a;
85+
toJSON (CoverTypeCoverTest6 a) = Data.Aeson.Types.ToJSON.toJSON a;
86+
toJSON (CoverTypeCoverTest7 a) = Data.Aeson.Types.ToJSON.toJSON a;
87+
toJSON (CoverTypeCoverTest8 a) = Data.Aeson.Types.ToJSON.toJSON a;
88+
toJSON (CoverTypeCoverTest9 a) = Data.Aeson.Types.ToJSON.toJSON a;
89+
toJSON (CoverTypeCoverTest10 a) = Data.Aeson.Types.ToJSON.toJSON a;
90+
toJSON (CoverTypeCoverValue a) = Data.Aeson.Types.ToJSON.toJSON a}
91+
instance Data.Aeson.Types.FromJSON.FromJSON CoverTypeCoverVariants
92+
where {parseJSON val = case (CoverTypeCoverPetByAge Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeCoverMischling Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeCoverTest Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeCoverTest2 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeCoverTest3 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeCoverTest4 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeCoverTest5 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeCoverTest6 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeCoverTest7 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeCoverTest8 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeCoverTest9 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeCoverTest10 Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> ((CoverTypeCoverValue Data.Functor.<$> Data.Aeson.Types.FromJSON.fromJSON val) GHC.Base.<|> Data.Aeson.Types.Internal.Error "No variant matched")))))))))))) of
9393
{Data.Aeson.Types.Internal.Success a -> GHC.Base.pure a;
9494
Data.Aeson.Types.Internal.Error a -> Control.Monad.Fail.fail a}}

testing/golden-output/src/OpenAPI/Types/CoverType.hs-boot

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ instance Show CoverType
66
instance Eq CoverType
77
instance Data.Aeson.FromJSON CoverType
88
instance Data.Aeson.ToJSON CoverType
9-
data CoverTypeVariants
10-
instance Show CoverTypeVariants
11-
instance Eq CoverTypeVariants
12-
instance Data.Aeson.FromJSON CoverTypeVariants
13-
instance Data.Aeson.ToJSON CoverTypeVariants
9+
data CoverTypeCoverVariants
10+
instance Show CoverTypeCoverVariants
11+
instance Eq CoverTypeCoverVariants
12+
instance Data.Aeson.FromJSON CoverTypeCoverVariants
13+
instance Data.Aeson.ToJSON CoverTypeCoverVariants

testing/golden-output/src/OpenAPI/Types/Mischling.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,18 +160,18 @@ mkMischlingAnother_relativeOneOf5 = MischlingAnother_relativeOneOf5{mischlingAno
160160
--
161161
data MischlingAnother_relativeAnother_cat = MischlingAnother_relativeAnother_cat {
162162
-- | another_cat
163-
mischlingAnother_relativeAnother_cat :: Cat
163+
mischlingAnother_relativeAnother_catAnother_cat :: Cat
164164
} deriving (GHC.Show.Show
165165
, GHC.Classes.Eq)
166166
instance Data.Aeson.Types.ToJSON.ToJSON MischlingAnother_relativeAnother_cat
167-
where {toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["another_cat" Data.Aeson.Types.ToJSON..= mischlingAnother_relativeAnother_cat obj] : GHC.Base.mempty));
168-
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["another_cat" Data.Aeson.Types.ToJSON..= mischlingAnother_relativeAnother_cat obj] : GHC.Base.mempty)))}
167+
where {toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["another_cat" Data.Aeson.Types.ToJSON..= mischlingAnother_relativeAnother_catAnother_cat obj] : GHC.Base.mempty));
168+
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["another_cat" Data.Aeson.Types.ToJSON..= mischlingAnother_relativeAnother_catAnother_cat obj] : GHC.Base.mempty)))}
169169
instance Data.Aeson.Types.FromJSON.FromJSON MischlingAnother_relativeAnother_cat
170170
where {parseJSON = Data.Aeson.Types.FromJSON.withObject "MischlingAnother_relativeAnother_cat" (\obj -> GHC.Base.pure MischlingAnother_relativeAnother_cat GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "another_cat"))}
171171
-- | Create a new 'MischlingAnother_relativeAnother_cat' with all required fields.
172-
mkMischlingAnother_relativeAnother_cat :: Cat -- ^ 'mischlingAnother_relativeAnother_cat'
172+
mkMischlingAnother_relativeAnother_cat :: Cat -- ^ 'mischlingAnother_relativeAnother_catAnother_cat'
173173
-> MischlingAnother_relativeAnother_cat
174-
mkMischlingAnother_relativeAnother_cat mischlingAnother_relativeAnother_cat = MischlingAnother_relativeAnother_cat{mischlingAnother_relativeAnother_cat = mischlingAnother_relativeAnother_cat}
174+
mkMischlingAnother_relativeAnother_cat mischlingAnother_relativeAnother_catAnother_cat = MischlingAnother_relativeAnother_cat{mischlingAnother_relativeAnother_catAnother_cat = mischlingAnother_relativeAnother_catAnother_cat}
175175
-- | Defines the oneOf schema located at @components.schemas.Mischling.allOf.properties.another_relative.oneOf@ in the specification.
176176
--
177177
--

testing/golden-output/src/OpenAPI/Types/PetByAge.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,18 @@ mkPetByAgeAnother_relativeOneOf5 = PetByAgeAnother_relativeOneOf5{petByAgeAnothe
8888
--
8989
data PetByAgeAnother_relativeAnother_cat = PetByAgeAnother_relativeAnother_cat {
9090
-- | another_cat
91-
petByAgeAnother_relativeAnother_cat :: Cat
91+
petByAgeAnother_relativeAnother_catAnother_cat :: Cat
9292
} deriving (GHC.Show.Show
9393
, GHC.Classes.Eq)
9494
instance Data.Aeson.Types.ToJSON.ToJSON PetByAgeAnother_relativeAnother_cat
95-
where {toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["another_cat" Data.Aeson.Types.ToJSON..= petByAgeAnother_relativeAnother_cat obj] : GHC.Base.mempty));
96-
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["another_cat" Data.Aeson.Types.ToJSON..= petByAgeAnother_relativeAnother_cat obj] : GHC.Base.mempty)))}
95+
where {toJSON obj = Data.Aeson.Types.Internal.object (Data.Foldable.concat (["another_cat" Data.Aeson.Types.ToJSON..= petByAgeAnother_relativeAnother_catAnother_cat obj] : GHC.Base.mempty));
96+
toEncoding obj = Data.Aeson.Encoding.Internal.pairs (GHC.Base.mconcat (Data.Foldable.concat (["another_cat" Data.Aeson.Types.ToJSON..= petByAgeAnother_relativeAnother_catAnother_cat obj] : GHC.Base.mempty)))}
9797
instance Data.Aeson.Types.FromJSON.FromJSON PetByAgeAnother_relativeAnother_cat
9898
where {parseJSON = Data.Aeson.Types.FromJSON.withObject "PetByAgeAnother_relativeAnother_cat" (\obj -> GHC.Base.pure PetByAgeAnother_relativeAnother_cat GHC.Base.<*> (obj Data.Aeson.Types.FromJSON..: "another_cat"))}
9999
-- | Create a new 'PetByAgeAnother_relativeAnother_cat' with all required fields.
100-
mkPetByAgeAnother_relativeAnother_cat :: Cat -- ^ 'petByAgeAnother_relativeAnother_cat'
100+
mkPetByAgeAnother_relativeAnother_cat :: Cat -- ^ 'petByAgeAnother_relativeAnother_catAnother_cat'
101101
-> PetByAgeAnother_relativeAnother_cat
102-
mkPetByAgeAnother_relativeAnother_cat petByAgeAnother_relativeAnother_cat = PetByAgeAnother_relativeAnother_cat{petByAgeAnother_relativeAnother_cat = petByAgeAnother_relativeAnother_cat}
102+
mkPetByAgeAnother_relativeAnother_cat petByAgeAnother_relativeAnother_catAnother_cat = PetByAgeAnother_relativeAnother_cat{petByAgeAnother_relativeAnother_catAnother_cat = petByAgeAnother_relativeAnother_catAnother_cat}
103103
-- | Defines the oneOf schema located at @components.schemas.PetByAge.properties.another_relative.oneOf@ in the specification.
104104
--
105105
--

0 commit comments

Comments
 (0)