diff --git a/hydra-api.yaml b/hydra-api.yaml index 766cfd0b..a0b56822 100644 --- a/hydra-api.yaml +++ b/hydra-api.yaml @@ -589,17 +589,15 @@ components: name: description: name of the input type: string + value: + description: value of the input + type: string type: description: type of input type: string emailresponsible: description: whether or not to email responsible parties type: boolean - jobsetinputalts: - type: array - description: ??? - items: - type: string Jobset: type: object diff --git a/src/lib/Hydra/Schema/JobsetInputs.pm b/src/lib/Hydra/Schema/JobsetInputs.pm index d0d1665d..8ac2a560 100644 --- a/src/lib/Hydra/Schema/JobsetInputs.pm +++ b/src/lib/Hydra/Schema/JobsetInputs.pm @@ -134,21 +134,22 @@ __PACKAGE__->has_many( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-06 12:22:36 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5uKwEhDXso4IR1TFmwRxiA -my %hint = ( - string_columns => [ - "name", - "type" - ], - boolean_columns => [ - "emailresponsible" - ], - relations => { - "jobsetinputalts" => "value" - } -); +sub as_json { + my $self = shift; -sub json_hint { - return \%hint; + my ($input) = $self->jobsetinputalts; + + my %json = ( + # string_columns + "name" => $self->get_column("name") // "", + "type" => $self->get_column("type") // "", + "value" => $input->value // "", + + # boolean_columns + "emailresponsible" => $self->get_column("emailresponsible") ? JSON::true : JSON::false, + ); + + return \%json; } 1;