title: Use artifact version number in OpenAPI spec definition
body: <p>I have a maven project with my API definition using the OpenaAPI v3 specification. </p>
  
  <p>I generate the code using the openapi-generator-maven-plugin and all works fine. I'm also able to access the swagger-ui and view and test my API.</p>
  
  <p>The problem is that I don't want to maintain the version number twice. So I'd like to refer the version number from my maven pom in my api spec instead of duplicating it with the risk of it getting outdated.</p>
  
  <p>I've tried maven resource filtering, which seems to work. Since the yaml file in the target folder gets it nicely replaced when I put <code>${project.version}</code> in the version field in the spec, but when I open the swagger-ui it prints "${project.version}" literally instead of the actual version.</p>
  
  <p>This is the plugin config from my pom:</p>
  
  <pre><code>&lt;build&gt;
        &lt;resources&gt;
          &lt;resource&gt;
            &lt;directory&gt;src/main/resources&lt;/directory&gt;
            &lt;filtering&gt;true&lt;/filtering&gt;
          &lt;/resource&gt;
        &lt;/resources&gt;
        &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-maven-plugin.version}&lt;/version&gt;
            &lt;executions&gt;
              &lt;execution&gt;
                &lt;goals&gt;
                  &lt;goal&gt;generate&lt;/goal&gt;
                &lt;/goals&gt;
                &lt;configuration&gt;
                  &lt;inputSpec&gt;${project.build.resources[0].directory}/spec.yml&lt;/inputSpec&gt;
                  &lt;ignoreFileOverride&gt;${project.build.resources[0].directory}/.openapi-codegen-ignore&lt;/ignoreFileOverride&gt;
                  &lt;language&gt;spring&lt;/language&gt;
                  &lt;library&gt;spring-boot&lt;/library&gt;
                  &lt;configOptions&gt;
                    &lt;!-- Use the newer java.time package instead of outdated java.util--&gt;
                    &lt;dateLibrary&gt;java8&lt;/dateLibrary&gt;
                  &lt;/configOptions&gt;
                  &lt;apiPackage&gt;${default.package}.api&lt;/apiPackage&gt;
                  &lt;modelPackage&gt;${default.package}.model&lt;/modelPackage&gt;
                  &lt;invokerPackage&gt;${default.package}.invoker&lt;/invokerPackage&gt;
                  &lt;generateApiTests&gt;false&lt;/generateApiTests&gt;
                &lt;/configuration&gt;
              &lt;/execution&gt;
            &lt;/executions&gt;
         &lt;/plugin&gt;
         ...
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>This is my spec.yml:</p>
  
  <pre><code>openapi: 3.0.0
  info:
    version: ${project.version}
  ...
  </code></pre>