Generator

struct Generator

Generator for parsing an OpenAPI specification and generating a library from it

  • OpenAPI specification in JSON format

    Declaration

    Swift

    var specification: String
  • path to the directory where output files shall be located

    Declaration

    Swift

    var targetDirectory: Path
  • name of the library to be generated

    Declaration

    Swift

    var packageName: String
  • Parses an OpenAPI specification and generates a library

    Throws

    error if generating the library fails

    Declaration

    Swift

    func generate() throws -> [URL]

    Return Value

    list of file URLs of generated library