title: Swagger: Structural error at should have required property 'paths' missingProperty: paths - extracting common components to external swagger file
body: <p>I have several yaml files in which many components are the same. For example I have 10 Language.java files with classes in different packages generated therefore I cannot write universal converters in code and I have some copy paste code in project.. Is it possible to do that somehow ?</p>
  
  <p>Moreover I am using Java 8 and Maven to generate java code from swagger files:</p>
  
  <pre><code> &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.openapitools&lt;/groupId&gt;
                  &lt;artifactId&gt;openapi-generator-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${openapi-generator.version}&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;commons&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;generate&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;inputSpec&gt;${project.basedir}/src/main/resources/common.yaml&lt;/inputSpec&gt;
                              &lt;generatorName&gt;spring&lt;/generatorName&gt;
                              &lt;apiPackage&gt;mypackage.api&lt;/apiPackage&gt;
                              &lt;modelPackage&gt;mypackage.model&lt;/modelPackage&gt;
                              &lt;configOptions&gt;
                                  &lt;dateLibrary&gt;java8&lt;/dateLibrary&gt;
                                  &lt;interfaceOnly&gt;true&lt;/interfaceOnly&gt;
                              &lt;/configOptions&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;forms&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;generate&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;inputSpec&gt;${project.basedir}/src/main/resources/a.yaml&lt;/inputSpec&gt;
                              &lt;generatorName&gt;spring&lt;/generatorName&gt;
                              &lt;apiPackage&gt;mypackage.a.api&lt;/apiPackage&gt;
                              &lt;modelPackage&gt;mypackage.a.model&lt;/modelPackage&gt;
                              &lt;configOptions&gt;
                                  &lt;dateLibrary&gt;java8&lt;/dateLibrary&gt;
                                  &lt;interfaceOnly&gt;true&lt;/interfaceOnly&gt;
                              &lt;/configOptions&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
  
  PLENTY OF OTHER YAML FILES AND PACKAGES GENERATING THE SAME COMMON CLASSES like Languages
  </code></pre>
  
  <p>The swagger:</p>
  
  <pre><code>openapi: "3.0.0"
  info:
    version: 1.0.0
    title: Swagger Commons
  
  components:
    schemas:
      Languages:
        type: array
        items:
          type: string
  </code></pre>
  
  <p>But this does not validate in swagger io as path </p>
  
  <blockquote>
    <p>Structural error at  should have required property 'paths'
    missingProperty: paths</p>
  </blockquote>