Project

General

Profile

Actions

Bug #3817

open

[API] Discovery document schema does not include generated fields like job dependencies

Added by Peter Amstutz over 9 years ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
Story points:
1.0
Release:
Release relationship:
Auto

Description

schema_controller.rb:87:

        object_properties = {}
        k.columns.
          select { |col| col.name != 'id' }.
          collect do |col|
          if k.serialized_attributes.has_key? col.name
            object_properties[col.name] = {
              type: k.serialized_attributes[col.name].object_class.to_s
            }
          else
            object_properties[col.name] = {
              type: col.type
            }
          end
        end

This is introspecting over the internal SQL columns known to ActiveRecord, rather than the public data model declared in the 'api_accessible' stanzas of each subclass of ArvadosModel. This results in bugs such as Workbench recognizing fields on the internal SQL schema that are not intended for external consumption.

Fixing this is probably a prerequisite to #3818


Related issues

Related to Arvados - Feature #19929: Improve documentation in the discovery documentNewBrett SmithActions
Actions

Also available in: Atom PDF