Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #3101
Closed
Open
Issue created Jun 05, 2019 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG][SWIFT] Error generating podspec

Created by: ppaulojr

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

The podspec file generated does not pass pod lint

openapi-generator version

4.0.0

OpenAPI declaration file content or url

https://gist.github.com/ppaulojr/31680ccb3a27ebcc30f9aa3559f271c2

Command line used for generation

openapi-generator generate -i openapi.json --generator-name swift4 --additional-properties=projectName=PostmonSwift,podSource=https://github.com/ppaulojr/PostmonSwift.git,podVersion=1.0.0,podAuthors=PPJ,podSocialMediaURL=https://twitter.com/ppaulojr,swiftUseApiNamespace=true,objcCompatible=true

Steps to reproduce
  1. Generate the code using the above command.
  2. Upload to repo using git_push.sh
  3. Run pod lib lint

Error:


 -> PostmonSwift.podspec
    - ERROR | spec: The specification defined in `/Users/ppaulojr/git/contribute/postmon/docs/PostmonSwift.podspec` could not be loaded.


[!] Invalid `PostmonSwift.podspec` file: undefined local variable or method `github' for Pod:Module.

 #  from /Users/ppaulojr/git/contribute/postmon/docs/PostmonSwift.podspec:7
 #  -------------------------------------------
 #    s.version = '1.0.0'
 >    s.source = https://github.com/ppaulojr/PostmonSwift.git
 #    s.authors = 'PPJ'
 #  -------------------------------------------


[!] /Users/ppaulojr/git/contribute/postmon/docs/PostmonSwift.podspec did not pass validation, due to 1 error.
You can use the `--no-clean` option to inspect any issue.
Related issues/PRs

N/A

Suggest a fix

The source seems off usually source is something like:

s.source           = { :git => "https://github.com/ppaulojr/Simplicity.git", :tag => s.version.to_s }
Assignee
Assign to
Time tracking