NAME
IO::K8s::ApiextensionsApiserver::Pkg::Apis::Apiextensions::V1::JSONSchemaPropsOrBool - JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.
VERSION
version 1.106
DESCRIPTION
The union type behind additionalProperties and additionalItems in a CRD schema. Upstream it serializes as the bare alternative, never as a tagged wrapper:
additionalProperties: false # boolean -> allows
additionalProperties: { type: str } # schema -> schema
Exactly one arm is populated, and which one it was survives a round trip: false stays false and never collapses into an empty schema object.
my $ap = $props->additionalProperties;
if ($ap->is_schema) { ... $ap->schema ... }
else { ... $ap->allows ... }
schema
The schema arm: a IO::K8s::ApiextensionsApiserver::Pkg::Apis::Apiextensions::V1::JSONSchemaProps, or undef when the boolean arm is in use.
allows
The boolean arm, 0 or 1. Defaults to 1, matching upstream. Only consulted when schema is undef.
is_schema
True when the schema arm is in use, false when the boolean arm is.
FROM_STRUCT
my $ap = $class->FROM_STRUCT($struct, $k8s);
Inflation hook called by "struct_to_object" in IO::K8s. A HashRef (or an already built JSONSchemaProps) fills schema; anything else is read as a boolean into allows. JSON booleans, \1 / \0 scalar refs and the plain scalars YAML::PP produces are all accepted.
TO_JSON
Returns the bare arm: the serialized schema, or a JSON boolean.
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