mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
23 lines
424 B
Ruby
Executable File
23 lines
424 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
|
|
require 'pathname'
|
|
require 'tempfile'
|
|
|
|
openapi_yaml_spec_path = "./tmp/oas-generated.yml"
|
|
full_spec = `#{Pathname(__dir__).join('spec')} --format yaml`
|
|
status = 1
|
|
|
|
begin
|
|
File.open(openapi_yaml_spec_path, "w+") do |file|
|
|
file.puts full_spec
|
|
end
|
|
|
|
`npx @redocly/openapi-cli lint #{openapi_yaml_spec_path}`
|
|
|
|
status = $?.exitstatus
|
|
ensure
|
|
FileUtils.rm_f openapi_yaml_spec_path
|
|
end
|
|
|
|
exit status
|