The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

OpenAPI::Client::OpenAI::Schema - OpenAI API client Schema

DESCRIPTION

This module contains the schema for the OpenAI API client. To aid in comprehension, the schema has all references resolved. This makes this schema much larger than the original OpenAPI schema.

SCHEMA

[% schema %]

COPYRIGHT AND LICENSE

Copyright (C) 2023-2024 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available. TEMPLATE }

sub pod_method_template () { return \<<'TEMPLATE'; =head1 NAME

OpenAPI::Client::OpenAI::Methods - Methods for OpenAI API

DESCRIPTION

Yes, this isn't perfect. But it's a start. The OpenAI API is complex and and the OpenAPI::Client module is a bit opaque at times. We'll add more later.

METHODS

[% FOREACH method IN methods.keys.sort %] [%- summary = methods.$method.summary -%] [%- parameters = methods.$method.parameters -%] [%- request_body = methods.$method.request_body -%] [%- examples = methods.$method.examples -%]

[%- IF summary %] =head2 [% method %]

[% summary %] [%- IF examples %] =head3 Examples

See the following files in the distribution for examples:

    [% FOREACH parameter IN parameters %] =head4 [% parameter.name %]

    [% parameter.description -%]

    • Type: [% parameter.schema.type %]

    • In: [% parameter.in %]

    • Required: [% IF parameter.required %]True[% ELSE %]False[% END %]

    • Default: [% parameter.schema.default || 'N/A' %]

    • Example: [% parameter.schema.example || 'N/A' %]

    • Enum: [% parameter.schema.enum.join(', ') || 'N/A' %]

    [% END %] [% ELSE %] This method does not take any path or URL parameters. [% END %] [% END %] [%- IF request_body %] =head3 Request Body

    The request body is complicated. See OpenAPI::Client::OpenAI::Schema for details.

    [%-END -%] [% END -%]

COPYRIGHT AND LICENSE

Copyright (C) 2023-2024 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.

NAME

build_docs.pl - Build the documentation for the OpenAI API client

SYNOPSIS

        perl build_docs.pl [--dump]

DESCRIPTION

This script reads the OpenAPI specification file and generates the POD documentation for the OpenAI API client. The documentation is written to the lib/OpenAPI/Client/OpenAI directory. This documentation includes both the methods and the schema. The schema is fully expanded (references resolved) to make it easier for the developer to understand.

OPTIONS

  • --dump

    Dump the resolved OpenAPI specification to the console and exits. It's merely a convenience for debugging.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 169:

=over should be: '=over' or '=over positive_number'

Around line 212:

You forgot a '=back' before '=head1'