|
|
@ -37,8 +37,11 @@ module API |
|
|
|
class Root < ::API::OpenProjectAPI |
|
|
|
class Root < ::API::OpenProjectAPI |
|
|
|
helpers ::API::V3::Utilities::EpropsConversion |
|
|
|
helpers ::API::V3::Utilities::EpropsConversion |
|
|
|
|
|
|
|
|
|
|
|
# All endpoint accept query props as gzipped and base64 encoded json objects |
|
|
|
|
|
|
|
before do |
|
|
|
before do |
|
|
|
|
|
|
|
# Add Link header for openapi spec |
|
|
|
|
|
|
|
header 'Link', '</api/v3/openapi.json>; rel="service-desc"' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# All endpoint accept query props as gzipped and base64 encoded json objects |
|
|
|
transform_eprops |
|
|
|
transform_eprops |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
@ -86,6 +89,10 @@ module API |
|
|
|
API::OpenAPI.spec |
|
|
|
API::OpenAPI.spec |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get '/openapi.json' do |
|
|
|
|
|
|
|
API::OpenAPI.spec |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
get '/spec.yml' do |
|
|
|
get '/spec.yml' do |
|
|
|
content_type 'text/vnd.yaml' |
|
|
|
content_type 'text/vnd.yaml' |
|
|
|
|
|
|
|
|
|
|
|