make api scripts work from any working directory

pull/10650/head
Christophe Bliard 3 years ago
parent 3bea67da56
commit 76e64b8293
No known key found for this signature in database
GPG Key ID: 2BC07603210C3FA4
  1. 2
      script/api/spec
  2. 2
      script/api/validate_spec

@ -11,7 +11,7 @@ require 'pathname'
require 'yaml'
require 'json'
require './lib/api/open_api'
require_relative '../../lib/api/open_api'
path = Pathname(__dir__).join("../../docs/api/apiv3/openapi-spec.yml")
spec = API::OpenAPI.assemble_spec path

@ -3,7 +3,7 @@
require 'pathname'
require 'tempfile'
openapi_yaml_spec_path = "./tmp/oas-generated.yml"
openapi_yaml_spec_path = Pathname(__dir__).join('../../tmp/oas-generated.yml')
full_spec = `#{Pathname(__dir__).join('spec')} --format yaml`
status = 1

Loading…
Cancel
Save