Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mfleader committed Apr 29, 2024
1 parent 1282c3c commit 9a7d244
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/arcaflow_plugin_sdk/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -2643,9 +2643,7 @@ def _to_jsonschema_fragment(
) -> any:
one_of = []
for k, v in self.types.items():
# noinspection PyProtectedMember
scope.objects[v.id]._to_jsonschema_fragment(scope, defs)

self._insert_discriminator(defs.defs[v.id], str(k))
if v.display is not None:
if v.display.name is not None:
Expand All @@ -2663,18 +2661,15 @@ def _to_openapi_fragment(
one_of = []
discriminator_mapping = {}
for k, v in self.types.items():
# noinspection PyProtectedMember
scope.objects[v.id]._to_openapi_fragment(scope, defs)
name = v.id + self.oneof_type + str(k)
discriminator_mapping[k] = "#/components/schemas/" + name

self._insert_discriminator(defs.defs[v.id], str(k))
if v.display is not None:
if v.display.name is not None:
defs.defs[v.id]["title"] = v.display.name
if v.display.description is not None:
defs.defs[v.id]["description"] = v.display.description

defs.components[name] = defs.defs[v.id]
one_of.append({"$ref": "#/components/schemas/" + name})
return {
Expand Down

0 comments on commit 9a7d244

Please sign in to comment.