public inbox for pve-user@lists.proxmox.com
 help / color / mirror / Atom feed
From: Erik Hollensbe <erik@hollensbe.org>
To: pve-user@lists.proxmox.com
Subject: [PVE-User] Extracting/leveraging the JSON schema
Date: Wed, 16 Dec 2020 01:48:04 -0800	[thread overview]
Message-ID: <CADHGEEKW+ckrBd9Z3iAaV-VOoL3N_anprA-hmH0fpc=FjKJoZA@mail.gmail.com> (raw)

I'd like to extract the JSON schema for use in generating a golang API.
Judging from brief googling I've seen others have attempted this but I was
hoping to make an effective dent in the problem. I think it'd be really
useful in terraform and other orchestration tools that are typically
written in that language (these days at least).

I reviewed the pve-common packages, specifically, the PVE::JSONSchema perl
module and it looks like a parser but not the actual API.

Best I can tell from googling and looking at the files in /usr/share/pve is
that there is a api.js (I forget the exact filename) that contains what I
seek, unfortunately it is coupled with some additional framework code to
generate it all, best I can tell?

What I'd really like to do is get ya'll up to speed so that your API can be
consumed by codegen tools that are out there. Let me know how I can help
and facilitate this. Swagger would be a bold idea/ideal here, if you're up
for considering something along those lines as well. The swagger/openapi
codegen tools are dull but effective for a lot of languages.

The PVE API is vast and I don't see the feasibility in porting it by hand
100%, especially when you consider future maintenance burdens, so something
that could generate code or dynamically configure a client would be an
ideal solution assuming it is needed and can be bootstrapped.

Thanks and I hope this message from a brand new ML user is not too forward
:)

-Erik


             reply	other threads:[~2020-12-16  9:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16  9:48 Erik Hollensbe [this message]
2020-12-16 10:30 ` Fabian Grünbichler
2020-12-16 11:24   ` Erik Hollensbe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADHGEEKW+ckrBd9Z3iAaV-VOoL3N_anprA-hmH0fpc=FjKJoZA@mail.gmail.com' \
    --to=erik@hollensbe.org \
    --cc=pve-user@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal