mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
abbaf045c5
- validation script used unmaintained npm package - switched to actively maintained package from same maintainer - pipe full output to stdout - bump node major version in development backend Dockerfile - fix two api spec errors and two random warnings - boyscout, hell yeah
29 lines
562 B
Ruby
Executable File
29 lines
562 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
|
|
require "pathname"
|
|
require "tempfile"
|
|
|
|
openapi_yaml_spec_path = Pathname(__dir__).join("../../tmp/oas-generated.yml")
|
|
full_spec = `#{Pathname(__dir__).join("spec")} --format yaml`
|
|
status = $?.exitstatus
|
|
if status != 0
|
|
warn "failed to bundle the openapi spec yaml file"
|
|
exit status
|
|
end
|
|
|
|
status = 1
|
|
|
|
begin
|
|
File.open(openapi_yaml_spec_path, "w+") do |file|
|
|
file.puts full_spec
|
|
end
|
|
|
|
system("npx @redocly/cli lint #{openapi_yaml_spec_path}")
|
|
|
|
status = $?.exitstatus
|
|
ensure
|
|
FileUtils.rm_f openapi_yaml_spec_path
|
|
end
|
|
|
|
exit status
|