When trying to do a pod update you get the below 2 errors
Fetching podspec for `SwaggerClient` from `./swift-client`
[!] The `SwaggerClient` pod failed to validate due to 2 errors:
- ERROR | attributes: Missing required attribute `homepage`.
- ERROR | attributes: Missing required attribute `summary`.
- WARN | source: The version should be included in the Git tag.
- WARN | source: Git SSH URLs will NOT work for people behind firewalls configured to only allow HTTP, therefore HTTPS is preferred.
Run pod update/install
Insert the below lines in the podspec file
s.summary = 'Swagger Swift SDK'
s.homepage = "http://swagger.io/"
@omerjanjua thanks for reporting the issue. I'll take a look...
I should be able to come up with a fix by tomorrow.
Thanks, here's my podfile for reference
I've filed #3850 to add default values for Swift podspec.
By the way, you can customize the podspec via CLI options:
swagger-codegen|fix_swift_pod_file⚡ ⇒ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar config-help -l swift
CONFIG OPTIONS
sortParamsByRequiredFlag
Sort method arguments to place required parameters before optional parameters. (Default: true)
ensureUniqueParams
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
projectName
Project name in Xcode
responseAs
Optionally use libraries to manage response. Currently PromiseKit, RxSwift are available.
unwrapRequired
Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema
podSource
Source information used for Podspec
podVersion
Version used for Podspec
podAuthors
Authors used for Podspec
podSocialMediaURL
Social Media URL used for Podspec
podDocsetURL
Docset URL used for Podspec
podLicense
License used for Podspec
podHomepage
Homepage used for Podspec
podSummary
Summary used for Podspec
podDescription
Description used for Podspec
podScreenshots
Screenshots used for Podspec
podDocumentationURL
Documentation URL used for Podspec
swiftUseApiNamespace
Flag to make all the API classes inner-class of {{projectName}}API
hideGenerationTimestamp
hides the timestamp when files were generated (Default: true)
PR merged. Please pull the latest master to give it a try.
How does this tie in with http://editor.swagger.io/#/
I'm not using the petstore example. When I generate client side code from that url the podspec is still outdated.
If you're using editor.swagger.io, which uses the latest stable version of Swagger Codegen (generator), you will have to wait for the next stable release 2.2.0.
or you can build the JAR based on the latest master: https://github.com/swagger-api/swagger-codegen/#getting-started
Most helpful comment
I've filed #3850 to add default values for Swift podspec.
By the way, you can customize the podspec via CLI options: