Home

Awesome

Autorest.Swift

Issues

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

Contributing

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 opencode@microsoft.com 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
use-extension:
  "@autorest/modelerfour": "4.15.442"

modelerfour:
  # 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

naming:
  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
  override:
    $host: $host

pass-thru:
  - model-deduplicator
  - subset-reducer

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

  swift/emitter:
    input: swift
    scope: swift-scope/emitter

swift-scope/emitter:
  input-artifact: swift-files

output-artifact: swift-files

Impressions