NAME
IO::K8s::ApiextensionsApiserver::Pkg::Apis::Apiextensions::V1::JSONSchemaPropsOrStringArray - JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.
VERSION
version 1.106
DESCRIPTION
The union type behind the values of dependencies in a CRD schema. Upstream it serializes as the bare alternative, never as a tagged wrapper:
dependencies:
creditCard: [ billingAddress ] # string array -> property
shipping: { type: object } # schema -> schema
Exactly one arm is populated, and which one it was survives a round trip.
my $dep = $props->dependencies->{creditCard};
if ($dep->is_schema) { ... $dep->schema ... }
else { ... $dep->property ... }
schema
The schema arm: a IO::K8s::ApiextensionsApiserver::Pkg::Apis::Apiextensions::V1::JSONSchemaProps, or undef when the string array arm is in use.
property
The string array arm: an ArrayRef of property names, or undef when the schema arm is in use. An empty ArrayRef is a populated arm and serializes as [].
is_schema
True when the schema arm is in use, false when the string array arm is.
FROM_STRUCT
my $dep = $class->FROM_STRUCT($struct, $k8s);
Inflation hook called by "struct_to_object" in IO::K8s. An ArrayRef fills property, anything else fills schema.
TO_JSON
Returns the bare arm: an ArrayRef of property names, or the serialized schema.
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/pplu/io-k8s-p5/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHORS
Torsten Raudssus <getty@cpan.org>
Jose Luis Martinez Torres <jlmartin@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2018-2026 by Jose Luis Martinez Torres <jlmartin@cpan.org>.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004