From nobody Sun Jan 24 01:46:10 2021
Return-Path: <christoph.kappestein@gmail.com>
X-Original-To: httpapi@ietfa.amsl.com
Delivered-To: httpapi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1])
 by ietfa.amsl.com (Postfix) with ESMTP id 30CEF3A11A4
 for <httpapi@ietfa.amsl.com>; Sun, 24 Jan 2021 01:46:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level: 
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001, URIBL_BLOCKED=0.001]
 autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key)
 header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44])
 by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id wZ7Oe603UZqs for <httpapi@ietfa.amsl.com>;
 Sun, 24 Jan 2021 01:46:05 -0800 (PST)
Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com
 [IPv6:2a00:1450:4864:20::229])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by ietfa.amsl.com (Postfix) with ESMTPS id CC8AF3A11D8
 for <httpapi@ietf.org>; Sun, 24 Jan 2021 01:46:04 -0800 (PST)
Received: by mail-lj1-x229.google.com with SMTP id f17so11606183ljg.12
 for <httpapi@ietf.org>; Sun, 24 Jan 2021 01:46:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; 
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=7e+aGseYoPiOLtWCEDjwD35M8PUkHPVFZG5KS+u5Qkc=;
 b=sQqW9KBdDM41D5/C5VlDIEUNUGgEWcwKMPKUPgWNEGA0cKOSoizXqaY+OuvyM89SfM
 +6EKFjZvu6NoAS0BMMCJGOqz0JAbUaQlYffLRpfxJCm1W2xPBB1Z7iC8lPwVIAVS6kKV
 kbX2w9CEhrU4qE61qjnd86eWeGvdkFXLAAC+TOUE93iQ2w5SUJ6DjnF16OPMXGbrwjh6
 ZMB+K7cVZa72Dxvp+bK3w0o75eK7lFDNduydzYCRrBcqQeBpj0KJGXB7lLglA753uWKW
 q3OHr0Psz//gJcgoaBwyXAszDLuVHgz4gBEOFl7uI0qukXivrNOiZ7kjMmEEtUSjjjfL
 zvog==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=7e+aGseYoPiOLtWCEDjwD35M8PUkHPVFZG5KS+u5Qkc=;
 b=IgHwEy5wO4NkluxNfuQ9vobnpV1Thrbr2iQczPaTB+wWDVc0JaAyF1dRRachUGNnnr
 govWAgVDQ3R/0+Vl0tqlUDH+MlC8YOil54MAhzqUVeBFdnXc+VSCDxYdNO27pCUVT608
 m2djdsRExwTvyVLoM2W4Mw3r33KhWnwoHfkNKLqBqq30VPZFKmo4V4g6YKSnQhBOz1aD
 YaL+9EB2wvdG76Je+4KXExPF0D0ChD3ZDTqhim647onkw8faRIuRFmUh1WziJzhW/PTy
 cA2q02aOCTQuTCpENYkQRTzkQdnd4e2vxqJOY/yAM13bA4+U27tcgk0IYKUfiD84QsO7
 RYUg==
X-Gm-Message-State: AOAM531dtQO+foDJJewKrItn5DtCo+gAlMo+Ko0ratFLfV8A4pqDYfNK
 MhptgnvX5TumNcjYeTPwmcnOkrTrYpWFSoPbB3eiAYwMylc=
X-Google-Smtp-Source: ABdhPJxXtAym6aplDWo1WCchi/b82Toc1pA4oA0AQJctknNmsUCm5J5Wso2qjOKAwS68wZw2rJCw9CXb5fjrW+h8ui8=
X-Received: by 2002:a2e:b5b5:: with SMTP id f21mr3126ljn.239.1611481562427;
 Sun, 24 Jan 2021 01:46:02 -0800 (PST)
MIME-Version: 1.0
References: <CALcRZn6-ojAAdJcMWFHef70Xp32O2iFatuw-YjGLKtr8VnbmYQ@mail.gmail.com>
 <DM6PR00MB0845824BE38945071F9774A5F0A69@DM6PR00MB0845.namprd00.prod.outlook.com>
 <CALcRZn6HdXE2WAn0vSod0XDY_yJd7jV7m5JnRWKWGDJaDaag-A@mail.gmail.com>
 <BL0PR00MB083637DAD075EC8E5342A0A9F0A59@BL0PR00MB0836.namprd00.prod.outlook.com>
 <CAEdRHi4q4d4RF1x8YJcJiWrMSij9FjK9pWjj7DMygqX38dZC1w@mail.gmail.com>
In-Reply-To: <CAEdRHi4q4d4RF1x8YJcJiWrMSij9FjK9pWjj7DMygqX38dZC1w@mail.gmail.com>
From: Christoph Kappestein <christoph.kappestein@gmail.com>
Date: Sun, 24 Jan 2021 10:46:02 +0100
Message-ID: <CALcRZn5QMQK3xzKHSYJAsbzvHN3SJ2xNJGZ2R1i60Tc543+xxQ@mail.gmail.com>
To: "httpapi@ietf.org" <httpapi@ietf.org>
Cc: Darrel Miller <Darrel.Miller=40microsoft.com@dmarc.ietf.org>
Content-Type: multipart/alternative; boundary="0000000000001738c005b9a24a2d"
Archived-At: <https://mailarchive.ietf.org/arch/msg/httpapi/eRdooimyR3DEWdyCxFxL_ICHZAA>
Subject: Re: [httpapi] Discussion about JSON payloads and code generation
X-BeenThere: httpapi@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Building Blocks for HTTP APIs <httpapi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/httpapi>,
 <mailto:httpapi-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/httpapi/>
List-Post: <mailto:httpapi@ietf.org>
List-Help: <mailto:httpapi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/httpapi>,
 <mailto:httpapi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 24 Jan 2021 09:46:08 -0000

--0000000000001738c005b9a24a2d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi,

Thanks for the feedback.

@Jason this is true and I totally understand your concern. I think the
difficult
part is to define a "core" which works for every use case i.e. code
generation,
validation, documentation, etc. We should ask what is the common ground of
all
these specs? In JSON Schema this is probably only the part how documents an=
d
types are referenced (JSON Path). But thanks for the offer and the great
feedback which you have provided, I will also give you an answer at our
github
issue, if I find the time finally ;)

@Darrel the idea sounds great to define the representation of data types. A=
t
TypeSchema we have defined the following primitive types:
- date (rfc3339 full-date)
- date-time (rfc3339 date-time)
- time (rfc3339 full-time)
- duration (ISO 8601)
- binary (base64 encoded)

We have found that most programming languages have internal object
representations for these kinds of types. If we would have an official list
with
a fitting identifier for a type, then we could also use this identifier at
the
"format" in JSON Schema/TypeSchema to describe the type.

I am wondering whether it would be also possible to describe complex types
in such a specification, i.e. that we describe how a list, map or
object/struct
type could look and is defined through keywords. So I would totally support
this
effort, since this is basically the reason why we have developed TypeSchema
and
we would be happy to build upon such a specification.

best regards
Christoph


Am Mo., 18. Jan. 2021 um 11:17 Uhr schrieb Asbj=C3=B8rn Ulsberg <
asbjorn@ulsberg.no>:

> s=C3=B8n. 17. jan. 2021 kl. 22:17 skrev Darrel Miller
> <Darrel.Miller=3D40microsoft.com@dmarc.ietf.org>:
>
> > In the spirit of "do one thing and do it well" we could have different
> > specifications for specific use cases, which would be a much more
> flexible
> > framework than forcing every schema to be a vocabulary. A generator
> could then
> > support only specific schema types.
>
> Ulysse Carion has already created a schema language specifically
> tailored for code generation with RFC 8927.
>
> https://www.rfc-editor.org/rfc/rfc8927.html
>
> --
> Asbj=C3=B8rn Ulsberg           -=3D|=3D-        asbjorn@ulsberg.no
> =C2=ABHe's a loathsome offensive brute, yet I can't look away=C2=BB
>

--0000000000001738c005b9a24a2d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,<br><br>Thanks for the feedback.<br><br>@Jason this is =
true and I totally understand your concern. I think the difficult<br>part i=
s to define a &quot;core&quot; which works for every use case i.e. code gen=
eration,<br>validation, documentation, etc. We should ask what is the commo=
n ground of all<br>these specs? In JSON Schema this is probably only the pa=
rt how documents and<br>types are referenced (JSON Path). But thanks for th=
e offer and the great<br>feedback which you have provided, I will also give=
 you an answer at our github<br>issue, if I find the time finally ;)<br><br=
>@Darrel the idea sounds great to define the representation of data types. =
At<br>TypeSchema we have defined the following primitive types:<br>- date (=
rfc3339 full-date)<br>- date-time (rfc3339 date-time)<br>- time (rfc3339 fu=
ll-time)<br>- duration (ISO 8601)<br>- binary (base64 encoded)<br><br>We ha=
ve found that most programming languages have internal object<br>representa=
tions for these kinds of types. If we would have an official list with<br>a=
 fitting identifier for a type, then we could also use this identifier at t=
he<br>&quot;format&quot; in JSON Schema/TypeSchema to describe the type.<br=
><br>I am wondering whether it would be also possible to describe complex t=
ypes<br>in such a specification, i.e. that we describe how a list, map or o=
bject/struct<br>type could look and is defined through keywords. So I would=
 totally support this<br>effort, since this is basically the reason why we =
have developed TypeSchema and<br>we would be happy to build upon such a spe=
cification.<br><br>best regards<br>Christoph<br><div><br></div></div><br><d=
iv class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Am Mo., 18. =
Jan. 2021 um 11:17=C2=A0Uhr schrieb Asbj=C3=B8rn Ulsberg &lt;<a href=3D"mai=
lto:asbjorn@ulsberg.no">asbjorn@ulsberg.no</a>&gt;:<br></div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid=
 rgb(204,204,204);padding-left:1ex">s=C3=B8n. 17. jan. 2021 kl. 22:17 skrev=
 Darrel Miller<br>
&lt;Darrel.Miller=3D<a href=3D"mailto:40microsoft.com@dmarc.ietf.org" targe=
t=3D"_blank">40microsoft.com@dmarc.ietf.org</a>&gt;:<br>
<br>
&gt; In the spirit of &quot;do one thing and do it well&quot; we could have=
 different<br>
&gt; specifications for specific use cases, which would be a much more flex=
ible<br>
&gt; framework than forcing every schema to be a vocabulary. A generator co=
uld then<br>
&gt; support only specific schema types.<br>
<br>
Ulysse Carion has already created a schema language specifically<br>
tailored for code generation with RFC 8927.<br>
<br>
<a href=3D"https://www.rfc-editor.org/rfc/rfc8927.html" rel=3D"noreferrer" =
target=3D"_blank">https://www.rfc-editor.org/rfc/rfc8927.html</a><br>
<br>
-- <br>
Asbj=C3=B8rn Ulsberg=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-=3D|=3D-=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"mailto:asbjorn@ulsberg.no" target=3D"_b=
lank">asbjorn@ulsberg.no</a><br>
=C2=ABHe&#39;s a loathsome offensive brute, yet I can&#39;t look away=C2=BB=
<br>
</blockquote></div>

--0000000000001738c005b9a24a2d--

