Skip to content

Commit 3652ee3

Browse files
committed
upgrade to ash_outstanding 0.2.2
1 parent af0bc88 commit 3652ee3

14 files changed

Lines changed: 68 additions & 15 deletions

File tree

lib/diffo/access/resources/characteristic_values/cable_value.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ defmodule Diffo.Access.CableValue do
44
55
CableValue - AshTyped Struct for Cable Characteristic Value
66
"""
7-
use Ash.TypedStruct, extensions: [AshJason.TypedStruct]
7+
use Ash.TypedStruct, extensions: [AshJason.TypedStruct, AshOutstanding.TypedStruct]
88

99
jason do
1010
pick [:name, :pairs, :length, :loss, :technology]
1111
compact true
1212
end
1313

14+
outstanding do
15+
expect [:pairs, :loss]
16+
end
17+
1418
typed_struct do
1519
field :name, :string, description: "the cable name"
1620

lib/diffo/access/resources/characteristic_values/card_value.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ defmodule Diffo.Access.CardValue do
44
55
CardValue - AshTyped Struct for Card Characteristic Value
66
"""
7-
use Ash.TypedStruct, extensions: [AshJason.TypedStruct]
7+
use Ash.TypedStruct, extensions: [AshJason.TypedStruct, AshOutstanding.TypedStruct]
88

99
jason do
1010
pick [:name, :family, :model, :technology]
1111
compact true
1212
end
1313

14+
outstanding do
15+
expect [:name]
16+
end
17+
18+
1419
typed_struct do
1520
field :name, :string, description: "the card name"
1621

lib/diffo/access/resources/characteristic_values/float_unit.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ defmodule Diffo.Access.FloatUnit do
44
55
FloatUnit - AshTyped Struct for Float with Unit
66
"""
7-
use Ash.TypedStruct, extensions: [AshJason.TypedStruct]
7+
use Ash.TypedStruct, extensions: [AshJason.TypedStruct, AshOutstanding.TypedStruct]
88

99
jason do
1010
pick [:amount, :unit]
11+
compact true
12+
end
13+
14+
outstanding do
15+
expect [:amount, :unit]
1116
end
1217

1318
typed_struct do

lib/diffo/access/resources/characteristic_values/integer_unit.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ defmodule Diffo.Access.IntegerUnit do
44
55
IntegerUnit - AshTyped Struct for Integer with Unit
66
"""
7-
use Ash.TypedStruct, extensions: [AshJason.TypedStruct]
7+
use Ash.TypedStruct, extensions: [AshJason.TypedStruct, AshOutstanding.TypedStruct]
88

99
jason do
1010
pick [:amount, :unit]
11+
compact true
12+
end
13+
14+
outstanding do
15+
expect [:amount, :unit]
1116
end
1217

1318
typed_struct do

lib/diffo/access/resources/characteristic_values/path_value.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ defmodule Diffo.Access.PathValue do
44
55
PathValue - AshTyped Struct for Path Characteristic Value
66
"""
7-
use Ash.TypedStruct, extensions: [AshJason.TypedStruct]
7+
use Ash.TypedStruct, extensions: [AshJason.TypedStruct, AshOutstanding.TypedStruct]
88

99
jason do
1010
pick [:name, :sections, :length, :loss, :technology]
1111
compact true
1212
end
1313

14+
outstanding do
15+
expect [:loss]
16+
end
17+
1418
typed_struct do
1519
field :name, :string, description: "the cable name"
1620

lib/diffo/access/resources/characteristic_values/shelf_value.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ defmodule Diffo.Access.ShelfValue do
44
55
ShelfValue - AshTyped Struct for Shelf Characteristic Value
66
"""
7-
use Ash.TypedStruct, extensions: [AshJason.TypedStruct]
7+
use Ash.TypedStruct, extensions: [AshJason.TypedStruct, AshOutstanding.TypedStruct]
88

99
jason do
1010
pick [:name, :family, :model, :technology]
1111
compact true
1212
end
1313

14+
outstanding do
15+
expect [:name]
16+
end
17+
1418
typed_struct do
1519
field :name, :string, description: "the shelf name"
1620

lib/diffo/access/services/characteristic_values/aggregate_interface.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ defmodule Diffo.Access.AggregateInterface do
44
55
AggregateInterface - AshTyped Struct for AggregateInterface Characteristic Value
66
"""
7-
use Ash.TypedStruct, extensions: [AshJason.TypedStruct]
7+
use Ash.TypedStruct, extensions: [AshJason.TypedStruct, AshOutstanding.TypedStruct]
88

99
jason do
1010
pick [:name, :physical_interface, :physical_layer, :link_layer, :svlan_id, :vpi]
1111
compact true
1212
end
1313

14+
outstanding do
15+
expect [:name]
16+
end
17+
18+
1419
typed_struct do
1520
field :name, :string, description: "the name of the aggregate interface"
1621

lib/diffo/access/services/characteristic_values/bandwidth_profile.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ defmodule Diffo.Access.BandwidthProfile do
44
55
BandwidthProfile - AshTyped Struct for BandwidthProfile
66
"""
7-
use Ash.TypedStruct, extensions: [AshJason.TypedStruct]
7+
use Ash.TypedStruct, extensions: [AshJason.TypedStruct, AshOutstanding.TypedStruct]
88

99
jason do
1010
pick [:downstream, :upstream, :units]
1111
compact true
1212
end
1313

14+
outstanding do
15+
expect [:downstream, :upstream, :units]
16+
end
17+
1418
typed_struct do
1519
field :downstream, :integer,
1620
constraints: [min: 0],

lib/diffo/access/services/characteristic_values/circuit.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Diffo.Access.Circuit do
44
55
Circuit - AshTyped Struct for Circuit Characteristic Value
66
"""
7-
use Ash.TypedStruct, extensions: [AshJason.TypedStruct]
7+
use Ash.TypedStruct, extensions: [AshJason.TypedStruct, AshOutstanding.TypedStruct]
88

99
alias Diffo.Access.BandwidthProfile
1010

@@ -13,6 +13,10 @@ defmodule Diffo.Access.Circuit do
1313
compact true
1414
end
1515

16+
outstanding do
17+
expect [:circuit_id]
18+
end
19+
1620
typed_struct do
1721
field :circuit_id, :string,
1822
constraints: [match: ~r/Q[A-Z]{4}\d{4} eth \d{1,4}:\d{1,4}/],

lib/diffo/access/services/characteristic_values/constraints.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ defmodule Diffo.Access.Constraints do
44
55
Constraints - AshTyped Struct for Constraints Characteristic Value
66
"""
7-
use Ash.TypedStruct, extensions: [AshJason.TypedStruct]
7+
use Ash.TypedStruct, extensions: [AshJason.TypedStruct, AshOutstanding.TypedStruct]
88

99
jason do
1010
pick [:max_latency, :min_profile]
1111
compact true
1212
end
1313

14+
outstanding do
15+
expect [:max_latency, :min_profile]
16+
end
17+
1418
typed_struct do
1519
field :max_latency, :integer,
1620
constraints: [min: 0, max: 47],

0 commit comments

Comments
 (0)