Releases: CreateAPI/CreateAPI
0.2.0
What's Changed
- Update Get dependency to require 2.1.x or later by @mgrider in #160
- Support multipart/form-data as opt-in feature by @ainame in #172
- Fix bug where object schemas representing an
allOftype with more than one schema but only one property were inferred as the wrong type by @liamnichols in #181
New Contributors
Full Changelog: 0.1.1...0.2.0
Artifact Bundle
Checksum: 6f8a3ce099f07eb2655ccaf6f66d8c9a09b74bb2307781c4adec36609ddac009
.binaryTarget(
name: "create-api",
url: "https://github.com/CreateAPI/CreateAPI/releases/download/0.2.0/create-api.artifactbundle.zip",
checksum: "6f8a3ce099f07eb2655ccaf6f66d8c9a09b74bb2307781c4adec36609ddac009"
)0.1.1
What's Changed
- List
jellyfin-sdk-swiftas a project using CreateAPI by @LePips in #148 - Add Xcode 14 and Swift 5.7 to CI by @liamnichols in #156
- Fix issue with Discriminator type resolution that impacted the decoding of
oneOftypes in some conditions by @liamnichols in #158 - Improve error messages that are used when
oneOfobject decoding fails by @liamnichols in #159
Full Changelog: 0.1.0...0.1.1
Artifact Bundle
Checksum: 0f0cfe7300580ef3062aacf4c4936d942f5a24ab971e722566f937fa7714369a
.binaryTarget(
name: "create-api",
url: "https://github.com/CreateAPI/CreateAPI/releases/download/0.1.1/create-api.artifactbundle.zip",
checksum: "0f0cfe7300580ef3062aacf4c4936d942f5a24ab971e722566f937fa7714369a"
)0.1
CreateAPI 0.1 makes some big changes to help prepare for even more features and enhancements. To make this possible, we've had to revisit a lot of parts of the way that the generator is used and while at the core there hasn't been much change, it's likely that you will need to adjust your configuration files and the way that you use the cli. For more details, please refer to the release notes below.
As always, if you have any problems then please feel free to create a new issue!
Enhancements
- #69 - Publish release to Homebrew.
- #48 - Support Swift Package Plugins.
- #58 - Improve readme, add usage documentation and contributing guides.
- #47 - Override any option in the configuration file from the command line using
--config-option. - #85 - Add custom package dependencies in generated package.
- #114 - Allow custom mapping between schema data types/formats and Swift types used in generation.
- #125 - Raise an error if the
--configfile doesn't exist instead of silently falling back to the default options. - #90 - Produce warnings when configuration files contain unknown or deprecated options.
- #76 - Add
--versionoption/command. - #71 - Support excluding individual properties on entities.
- #116, #141 - Write extension source files into Extensions directory and improve their filenames.
- #131 - Raise an error if you use
--cleanwhen the--outputdirectory also contains the schema or config file. - #138 - Trim whitespace from the
fileHeaderComment. - #140 - Run path generation in parallel.
Breaking Changes
- #83 - Generated packages and paths now depend on Get 1.0.2 or later. If you don't use Get, your
Requesttype must expose an initializer that matches the initializer defined in Get. - #88 - When generating a Swift Package, the Package.swift file and all other sources are written to the root of the
--outputdirectory instead of being nested inside a subdirectory. - #132 Default output directory is now ./CreateAPI when
--outputis not specified. - #112 - The
rename.propertiesoption now understands property names as defined in the original schema and not after applying CreateAPI transformations (such as case conversion or swifty style booleans). - #125 - The generator will now error if the path defined using
--configdid not contain a valid file (prior behaviour was to fallback to the default configuration). - #47 - Command Line Argument options that alter the generate output have now been moved into the configuration file and the behaviour may have also been adjusted.
--split(-s) is now the default behavior. Use themergeSourcesoption to merge generated source files.--filename-templatehas been replaced by theentities.filenameTemplateandpaths.filenameTemplateoptions.--entityname-templatehas been replaced by theentities.nameTemplateoption.--generatehas been replaced by thegenerateoption and now acceptspaths,entities,enumsandpackageto customize which components are generated.--packageand--modulehave been incorporated as part of thegenerateoption (see above) for controlling the generated outputs and the module/package name is configured using themoduleoption.--vendorhas been replaced by thevendoroption.
- #100 - For
entities,isGeneratingStructsandisMakingClassesFinalhave merged into a singledefaultTypeoption (accepted valuesstruct,classorfinalClass).isGeneratingMutableClassPropertiesandisGeneratingMutableStructPropertieshave been replaced by a singlemutablePropertiesoption. Specifytrue,false,structsorclassesinstead.entitiesGeneratedAsClassesandentitiesGeneratedAsStructshave been replaced by a singletypeOverridesoption.
- #98 -
commentsoptions have been replaced with a singlecommentOptionsproperty that acceptsfalse,trueor an array containing any of[title, description, example, externalDocumentation, capitalized]. - #97 -
isReplacingCommonAcronyms,addedAcronymsandignoredAcronymshave been replaced with a singleacronymsoption. - #94 -
isSwiftLintDisabledhas been removed. UsefileHeaderCommentif you want to replicate this behavior. - #93 -
isAdditionalPropertiesOnByDefaulthas been removed with no replacement. - #92 - Every generated
Requestnow includes itsoperationIdand theisAddingOperationIdsoption has now been removed. - #91 - Fixed a spelling mistake in
overridenResponsesandoverridenBodyTypes. - #63 -
isInliningPropertiesFromReferencedSchemasbehavior is now enabled by default and the option has renamed toinlineReferencedSchemas. - #75 -
isGeneratingCustomCodingKeysbehavior is now enabled by default and the option has been renamed tooptimizeCodingKeys. - #66 -
accessno longer accepts an open string. The value must be eitherinternalorpublic. - #114, #145 -
isUsingIntegersWithPredefinedCapacityhas been removed. You can now configure data type mappings to Swift types using thedataTypesoption. - #134 -
isGeneratingEnumshas been removed and is now configurable as part of the newgenerateoption. - #89 - Swifty style boolean properties in the configuration file have been renamed.
isNaiveDateEnabled▸useNaiveDateisPluralizationEnabled▸pluralizePropertiesisInliningTypealiases▸inlineTypealiasesisGeneratingSwiftyBooleanPropertyNames▸useSwiftyPropertyNamesisAddingDeprecations▸annotateDeprecationsentitiesisStrippingParentNameInNestedObjects▸stripParentNameInNestedObjectsisAddingDefaultValues▸includeDefaultValuesisSortingPropertiesAlphabetically▸sortPropertiesAlphabeticallyisGeneratingEncodeWithEncoder▸alwaysIncludeEncodableImplementationisGeneratingInitWithDecoder▸alwaysIncludeDecodableImplementationisGeneratingInitializers▸includeInitializerisSkippingRedundantProtocols▸skipRedundantProtocolsisGeneratingIdentifiableConformance▸includeIdentifiableConformance
pathsisRemovingRedundantPaths▸removeRedundantPathsisMakingOptionalPatchParametersDoubleOptional▸makeOptionalPatchParametersDoubleOptionalisInliningSimpleQueryParameters▸inlineSimpleQueryParametersisInliningSimpleRequests▸inlineSimpleRequestsisGeneratingResponseHeaders▸includeResponseHeadersisGeneratingCustomCodingKeys▸optimizeCodingKeysisInliningPropertiesFromReferencedSchemas▸inlineReferencedSchemas
Refer to the Configuration Options documentation for more information.
Internal
- #79 - Lint project using SwiftLint.
- #81 - Compile generated test snapshots on Linux as part of CI checks.
- #117 - Refactor file writing responsibility out of the
Generatecommand. - #122 - Cleanup tests with new
snapshot(spec:name:testCompilationOnLinux:arguments:configuration:)method. - #120 - Use swift-configuration-parser library.
- #128 - Refactor CreateAPITests structure and rewrite snapshotter.
- #123 - Automatically update AllPackages package when rerecording snapshots.
- #129 - Introduce 'Record Snapshots' scheme to simplify rerecording snapshots.
Full Changelog: 0.0.5...0.1.0
Arti...
0.0.5
What's Changed
- Support Linux by @liamnichols in #43
- Update Makefile by @liamnichols in #54
- Update generator code to point to https://github.com/kean/Get and not CreateAPI/Get by @liamnichols in #51
- Remove main.swift and mark CreateAPI as
@maintype directly by @liamnichols in #49 - Fix comment generation when using other kind of linebreaks by @liamnichols in #46
- Support automatically generating
Identifiableconformance on entities by @LePips in #61 - Tests - Automatic Path Finding and Remove Environment Variables by @LePips in #62
- Single source of truth for configuration options by @liamnichols in #52
- Update README and use new CreateOptions module by @liamnichols in #65
- Produce an artifactbundle when making releases by @liamnichols in #67
New Contributors
Full Changelog: 0.0.4...0.0.5
Artifact Bundle
Checksum: 89c75ec3b2938d08b961b94e70e6dd6fa0ff52a90037304d41718cd5fb58bd24
.binaryTarget(
name: "create-api",
url: "https://github.com/CreateAPI/CreateAPI/releases/download/0.0.5/create-api.artifactbundle.zip",
checksum: "89c75ec3b2938d08b961b94e70e6dd6fa0ff52a90037304d41718cd5fb58bd24"
)0.0.4
What's Changed
- Discriminator Support by @PhilipTrauner in #10
- Strip parent name of enum cases within nested objects by @PhilipTrauner in #15
- Added options for mutable properties in classes and structs by @JanC in #17
- Add entities name template by @imjn in #14
- Added imports option for entities by @JanC in #19
- Fix shouldGenerate check for entities.include option by @ainame in #20
- Fix namespace when using operations style by @simorgh3196 in #21
- Fix
Stringtype withbyteformat by @mattia in #25 - Fixed fileHeader option to fileHeaderComment by @imjn in #22
- Fixed test failures for string with byte format by @imjn in #26
- Fix test failures in comparing Package.swift by @imjn in #28
- Update repository links to github.com/CreateAPI/CreateAPI by @liamnichols in #35
- Support multiple discriminator mappings to share one type by @imjn in #36
- Update GitHub Workflow CI by @liamnichols in #37
- Fix allOf decoding issue by @imjn in #27
- Removed redundant space before struct and class declaration by @imjn in #38
- Decode JSON input specs using
YAMLDecoderby @liamnichols in #34 - Treat single element allOf/oneOf/anyOf schemas as the nested schema by @liamnichols in #39
New Contributors
- @JanC made their first contribution in #17
- @ainame made their first contribution in #20
- @mattia made their first contribution in #25
- @liamnichols made their first contribution in #35
Full Changelog: 0.0.2...0.0.4
0.0.3
What's Changed
- Fix an issue with
entities.includenot being used correctly
Full Changelog: 0.0.2...0.0.3
0.0.2
What's Changed
- Add support for installation by Mint by @simorgh3196 in #1
- Fixed small typos in README.md by @imjn in #2
- Fixed wrong example in readme yaml by @imjn in #4
- Add Entities.include by @imjn in #5
- Revert "Added entityPrefix and entitySuffix to GenerateOptions.Rename" by @imjn in #8
- Added --clean to readme by @imjn in #7
- Use builtin
UUIDtype foruuidformat in schemas by @PhilipTrauner in #11 - Fix tests by @PhilipTrauner in #13
Full Changelog: 0.0.1...0.0.2