title: Reference external file (openapi spec) from gradle plugin (openapitools generator)
body: <p>I am attempting to build an application that references an openapi spec that is already published in artifactory.  That means I'll be pulling the foo.yaml in as a dependency, but I can't seem to figure out how to actually reference that file by the openapitools generator plugin.</p>
  
  <p>Given that openapi specs can be used to generate both server code and client code, it makes perfect sense that it is published separately and simply pulled in and referenced by implementations.</p>
  
  <p>com.company.bar-1.0.10 contains foo.yaml at the top level of the jar.</p>
  
  <p>I've added the dependency at the top level of the build.gradle.kts file and I've also added it as a part of the plugin task itself.</p>
  
  <p>task generateFooCode(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) {</p>
  
  <pre><code>generatorName = "java"
  apiPackage = 'com.ehi.gbo.openapiconnect.api.foo'
  modelPackage = 'com.ehi.gbo.openapiconnect.model.foo'
  invokerPackage = 'com.ehi.gbo.openapiconnect.common.invoker'
  inputSpec = "foo.yaml".toString()
  outputDir = "$buildDir/generated-sources/foo".toString()
  configOptions = [
          dateLibrary          : "java8",
          useTags              : true,
          interfaceOnly        : true,
          delegatePattern      : false,
          useBeanValidation    : false,
          performBeanValidation: false,
          useOptional          : false,
          serviceImplementation: false,
          serviceInterface     : false,
          java8                : false,
          serializableModel    : true,
          skipDefaultInterface : true,
          reactive             : false,
  ]
  configurations {
      dependencies {
          implementation 'com.company.bar:foo-api:1.0.10'
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Results I'm getting:
  * What went wrong:
  Execution failed for task ':generateFooCode'.</p>
  
  <blockquote>
    <p>There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
       | Error count: 1, Warning count: 0
      Errors: 
            -unable to read location <code>foo.yaml</code></p>
  </blockquote>