►
Description
Carvel maintainer, Cari, demos how to generate an OpenAPI Schema from a ytt data values schema (and put it in your kapp-controller Package)
Files used: https://gist.github.com/cari-lynn/89a2a9796b5aa8d8bc5fecd17c782007
A
A
You
can
use
it
to
deploy
a
package
in
your
cap
controller
cr,
it's
a
way
to
just
declaratively
state
what
is
allowed
in
your
configuration
as
inputs,
so.
A
A
If
you're
using
ytt
right
now
and
using
data
values,
you
might
be
more
familiar
with
a
data
values
file
which
might
look
like
this.
So
it's
got
comments
in
it
to
describe
things
its
players,
values,
inline,
so
similar
differences
here
are
in
a
data
value
schema.
It
provides
not
only
like
the
values
themselves
as
defaults,
but
also
type
information,
so,
for
example,
for
your
load,
balancer
enabled
this
value
is
defaulted
to
true,
but
it
also
provides
type
information,
so
this
must
be
a
boolean.
A
A
If
we're
going
to
use
this,
we've
got
this
value
file,
schema
file
and
then
just
like
a
simple
template
here.
I'll
show
you
what
that
looks
like
it
really
just
outputs
the
data
values.
A
A
All
right
so
we're
going
to
totally
forget
about
this
values
file
and
only
going
to
use
the
schema,
because,
really
that's
all
that's
needed
to
create
an
open
api
document.
A
A
A
So
this
is
what
the
open
api
document
looks
like
that
y2
just
made
from
your
data
values
schema
and
you
can
see
everything
under
component
schemas
data
values.
Everything
in
here
is
the
actual
schema
for
your
everything
above
that
is,
like
header
information.
That's
used
by,
like
any
other
third-party
open
api
tools
that
you
need.
This
just
makes
this
valid
open
api.
So,
if
you
wanted
to,
like,
I
don't
know,
generate
html
or
documentation
based
on
this
schema,
then
you'll
know
it's
in
open
api,
3.0
format.
A
And
then
just
you
had
to
highlight
this
like,
for
example,
load
balance
without
enabled
it's
a
boolean
and
it
defaults
to
true.
You
can
see
that
right
here
or
sorry
right
here,
yep,
so
it
creates
all
of
the
type
information.
That's
in
your
data
value
schema
and
any
comments
has
descriptions
right
right.
So
this
can
be
used
in
a
cap
controller
package.
A
A
A
So
what
we
got
here
is
just
this
key.
Let
me
show
you
the
command.
We're
going
to
run.
Make
this
make
a
little
bit
more
sense.
A
A
A
So
then
we
can
deploy
this
and
use
it
for
our
configuration.
A
So
that's
really
like
the
main
use
case
that
I
wanted
to
go
over
today.
The
open
api
schema
can
be
used
for
other
things
as
well,
but
yeah
I'm
happy
to
answer
any
questions
about
that.