Swiftpack.co - Azure/autorest.swift as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Azure.
Azure/autorest.swift v0.1.0-dev.20201202.1
Extension for AutoRest that generates Swift code
⭐️ 5
🕓 3 days ago
.package(url: "https://github.com/Azure/autorest.swift.git", from: "v0.1.0-dev.20201202.1")



Please file issues for the repository in one of the following repositories as appropriate:

  • Azure/azure-sdk-for-ios : When you're experiencing trouble with the Swift SDK, but not with other languages, this is the repository to report bugs to. i.e. What we generate for Paged Operations doesn't make sense or there's something hard coded that shouldn't be.
  • Azure/autorest : Should you run into duplicated types, or fundamentally flawed enums, and it seems consistent across languages, but doesn't seem like the problems lies with the actual Azure Service, the problem could lie with how we're modeling the problem as we see it in the Open API Spec. File bugs matching this description to our parent project, "Autorest".
  • Azure/azure-rest-api-specs : If you're getting an error message from the service, saying that it requires a different set of parameters, or you're targeting the wrong endpoint, the problem is likely with the Azure OpenAPI Specs repository. i.e. It seems like the service isn't acurately described.


For details on contributing to this repository, see the contributing guide.

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Autorest plugin configuration

Please don't edit this section unless you're re-configuring how the Swift extension plugs in to AutoRest. AutoRest needs the below config to pick this up as a plug-in - see https://github.com/Azure/autorest/blob/master/docs/developer/architecture/AutoRest-extension.md

Swift code gen

# for details on options see: https://github.com/Azure/autorest.modelerfour/blame/master/modelerfour/readme.md

version: 3.0.6267
  "@autorest/modelerfour": "4.15.442"

  # this runs a pre-namer step to clean up names
  prenamer: true

  # this will flatten models marked with 'x-ms-client-flatten'
  flatten-models: true

  # this will flatten parameters when payload-flattening-threshold is specified (or marked in the input spec)
  flatten-payloads: true

  # this will make the content-type parameter always specified
  always-create-content-type-parameter: true

  # setting this to false will skip parameter flattening 
  # for operations that have multiple requests (ie, JSON and BINARY)
  multiple-request-parameter-flattening: false

  # enables parameter grouping via x-ms-parameter-grouping
  group-parameters: true

  parameter: camelcase
  property: camelcase
  operation: camelcase
  operationGroup:  pascalcase
  choice:  pascalcase
  choiceValue:  camelcase
  constant:  camelcase
  constantParameter:  camelcase
  type:  pascalcase
  local: _ + camelcase # TODO: Is this right?
  global: camelcase
  preserve-uppercase-max-length: 6
    $host: $host

  - model-deduplicator
  - subset-reducer

  swift: # <- name of plugin 
    input: modelerfour/identity
    output-artifact: swift-files

    input: swift
    scope: swift-scope/emitter

  input-artifact: swift-files

output-artifact: swift-files



Stars: 5
Last commit: 3 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

AutoRest for Swift v0.1.0-dev.20201202.1
2 years ago

Preview release of AutoRest for Swift

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics