PallidorMigrator
is a Swift package that generates a persistent facade layer for accessing a Web API dependency. Therefore, it incorporates all changes stated in a machine-readable migration guide into the internals of the facade. It is part of Pallidor, a commandline tool which automatically migrates client applications after a Web API dependency changed.
This library requires at least Swift 5.3 and macOS 10.15.
To integrate the PallidorMigrator
library in your SwiftPM project, add the following line to the dependencies in your Package.swift
file:
.package(url: "https://github.com/Apodini/PallidorMigrator.git", .branch("develop"))
Because PallidorMigrator
is currently under active development, there is no guarantee for source-stability.
To get started with PallidorMigrator
you first need to create an instance of it, providing the path to the directory in which the source files are located, and the textual representation of the migration guide:
let targetDirectory : String = ...
let migrationGuide : String = ...
let migrator = try PallidorMigrator(targetDirectory: targetDirectory, migrationGuideContent: migrationGuide)
To start with generating the persistent facade, you call the buildFacade()
method:
try migrator.buildFacade()
All generated facade files will be located under {targetDirectory}/PersistentModels
or {targetDirectory}/PersistentAPIs
The documentation for this package is generated with jazzy and can be found here.
Contributions to this projects are welcome. Please make sure to read the contribution guidelines first.
This project is licensed under the MIT License. See License for more information.