Skip to content

split http#410

Merged
duglin merged 7 commits into
xregistry:mainfrom
duglin:Sep8
Sep 25, 2025
Merged

split http#410
duglin merged 7 commits into
xregistry:mainfrom
duglin:Sep8

Conversation

@duglin

@duglin duglin commented Sep 19, 2025

Copy link
Copy Markdown
Contributor
  • Split the http stuff from spec.md. Now we have spec.md, http.md and model.md.
  • includes a lot of rewording, removing of duplicate statements and a bit of clarifications.
  • spec.md is now the core xReg stuff w/o any protocol specific APIs or model management discussions
  • As of today model.md still has http stuff in it but that'll be merged into http.md next week.
  • a few "TODOs" still in http.md for discussion for next week's PR
  • modelsource=null -> err or erase everything? #409 - allow for setting modelsource=null to erase entire model

fixes #409

@duglin
duglin force-pushed the Sep8 branch 3 times, most recently from eaacd85 to 0cce433 Compare September 19, 2025 12:15

@duglin duglin left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed with group

Comment thread core/spec.md Outdated
@@ -857,6 +897,9 @@ attributes. However, they MUST adhere to the following rules:

#### Common Attributes

TODO is it better to have this section, or to just define them fully
upon first usage and then have all other point to that first usage?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep it

Comment thread core/spec.md Outdated
The Resource's document is base64 encoded and serialized as a string.

- `<RESOURCE>url`: this attribute MUST be used when the Resource is stored
- `<RESOURCE>url`: this attribute MUST be used when the document is stored
external to the Registry. Its value MUST be a URL that can be used to
retrieve its contents via an HTTP(s) `GET`. There is no requirement for the

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it generic

Comment thread core/spec.md Outdated
@@ -1115,6 +1170,9 @@ of the existing entity. Then the existing entity would be deleted.
This specification does not place any constraints on the data returned from
an HTTP `GET` to this URL.

TODO do we want to keep the HTTP-ness of this URL? And 'icon' attr too.
deprecated.docs too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it generic

Comment thread core/spec.md Outdated
updated. A value of `null` MUST generate an error
([invalid_data](#invalid_data)).

TODO - null->err or erase?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

null -> erase

Comment thread core/spec.md Outdated
@@ -2363,18 +1722,21 @@ The following defines the specification-defined capabilities:
- It is STRONGLY RECOMMENDED that implementations support at least
`/capabilities` and `/model`.

TODO are these values HTTP specific? Perhaps not call this
"apis", but instead be called "readable" and remove the leading "/" ?
And then include "entities" in the list to align with "mutable" below?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave as is

Comment thread core/spec.md Outdated

It is expected that only certain clients (e.g. "admin" users) would be
allowed to edit this attribute. So, for "normal" users the "SHOULD"
statements are expected to be "MUST" statements.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/statements/statement/
SHOULD NOT

Comment thread core/spec.md Outdated

See: [`?binary` Flag](./http.md#binary-flag) for the HTTP usage.

TODO do we want references like this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do it for all

Comment thread core/spec.md Outdated
would return the same subset of entities.
expression(s) such that a query to that URL would return the same subset of
entities.
TODO ^^^ what if the protocol isn't http?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check the protocol to see if the filter flag appears in the URL or not

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add link to http spec

Comment thread core/spec.md Outdated
@@ -5765,19 +3616,62 @@ those cases, the client will need to query the individual inlineable attributes
in isolation so the Registry can leverage
[pagination](../pagination/spec.md) of the response.

TODO ^^^ ref to pagination

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tweak this

Comment thread core/spec.md

Regardless of the mechanism used to update the capabilities, the Registry's
`epoch` value MUST be incremented.
#### Offered Capabilities

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this /capabilitiesoffered

@duglin
duglin force-pushed the Sep8 branch 2 times, most recently from 4cb0e72 to 4d44343 Compare September 20, 2025 00:01
Signed-off-by: Doug Davis <duglin@gmail.com>
Comment thread core/spec.md Outdated
Additionally, this specification defines the core model and semantics of
xRegistry, while secondary specifications (such as
[xRegistry HTTP Binding](./http.md)) will discuss how to expose them in a
protocol specific way.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
protocol specific way.
protocol-specific way.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread core/spec.md Outdated
@@ -60,7 +55,7 @@ A Registry consists of two main types of entities: Resources and Groups of
such Resources.

Resources typically represent the main data of interest in the Registry, while
Groups, as the name implies, allow related Resources to be arranged together
Groups, as the name implies, allows related Resources to be arranged together

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was right as it was, because if you drop what's in between the comma, it would be "allow"

Comment thread core/spec.md Outdated
accessed through the Versions collection.
A Resource entity in the Registry holds one or more Versions of metadata, and
optionally a domain-specific document. If a Resource holds multiple Versions,
those can be organized with compatibility policies and lineage. Each Resource

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's link to compatibility and ancestor here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread core/spec.md

#### Document Resources vs Metadata-Only Resources

Each Version of a Resource MAY be defined to have a "domain-specific" document
associated with it. These documents MAY be stored within the Version as an
attribute, or MAY be stored external to the Version and a URL to its location
will be stored within the Version instead. This model design choice is
specified via the `hasdocument` aspect of the Resource's model definition.
specified via the
[`hasdocument` aspect](./model.md#groupsstringresourcesstringhasdocument)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can ignore this to a later point, but do we differentiate between attribute and aspect, and why and when? I think hasdocument is consistently referred to as an aspect, but not sure why the differentiation is made.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been trying to refer to "model attributes" as "aspects"... sort of like another word for "feature".
Then I use "attribute" for user-facing attributes in the data model (group, resources...).
But perhaps there's no point?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

define "aspect"

Comment thread core/spec.md
Comment on lines +299 to +300
This specification is designed such that clients can choose how they want the
data from a server to be returned. There are three main "views" that clients

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This specification is designed such that clients can choose how they want the
data from a server to be returned. There are three main "views" that clients
This specification is designed such that clients can choose how they want to interact with the Registry's data. There are three main interaction models that clients

Just a suggestion

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's chat tomorrow because we do use the terms "document view" and "api view" - so I was trying to (sort of) relate to those too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sticking with "view"

Comment thread core/spec.md Outdated
The above requirement is driven by the idea that modifying the capabilities
of a server and modifying any entity data are typically two very distinct
actions, and will not normally happen at the same time. However, if the
situation does occur a consistent (interoperable) processing order needs to

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
situation does occur a consistent (interoperable) processing order needs to
situation does occur, a consistent (interoperable) processing order needs to

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread core/spec.md Outdated
```
- Document View Constraints:
- REQUIRED.
- If the `meta` entity is inlined in the document then this attribute

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- If the `meta` entity is inlined in the document then this attribute
- If the `meta` entity is inlined in the document, then this attribute

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got them all

Comment thread core/spec.md Outdated

#### Resource Attributes
When the xRegistry metadata is serialized as a JSON object, the processing
of the 3 Version `<RESOURCE>` attributes MUST follow these rules:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this Version-level, and add a * after <RESOURCE to clarify exactly what is meant?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread core/spec.md
used.

An `xref` value that points to a non-existing Resource, either because
it was deleted, never existed or the current client does not have permission

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the permission case be handled differently? I agree for the other situations, but accessing a resource that you're not authorized to see would give you a NotAuthorised in most other environments, which is helpful to understand why it can't be found, and now, there are multiple possible reasons it can't be found that may have to be validated somehow by the user. Why can't this be handled differently?

I know this was already here and you moved it around, but now I reread it and this thought came up.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss tomorrow, but they do have access to the Resource with the "xref" (the source), so they can always "GET" that one. If they don't have access to the target of the "xref" I'm not sure they should get a "401 Not Authorized" on a GET to the source.

It seems safest to treat a "missing target" the same as "you don't have permission to see the target".
From a security perspective, even saying "the target exists but you can access it" is a security issue to some folks because it makes hackers aware that "something" is even there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave as is

Comment thread core/spec.md Outdated
Versions of Messages. Non-leaf parts of the `<PATH>` MUST only reference
xRegistry collection names and not any specific entity IDs since `<PATH>` is
meant to be an abstract traversal of the model.
The value of the `inline` flag is list of `<PATH>` values where is a string

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The value of the `inline` flag is list of `<PATH>` values where is a string
The value of the `inline` flag is a list of `<PATH>` values where is a string

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually something is wrong at the end too, but not sure how to fix it 😅

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See if this is better:

The value of the `inline` flag is a list of `<PATH>` values where each is a 
string indicating which inlineable attribute to show in the response. 

Signed-off-by: Doug Davis <duglin@gmail.com>
Comment thread core/http.md Outdated
### No-Code Servers

In the [core specification](./spec.md) there is a
disussion about ["no-code servers"](./spec.md#design-no-code-servers). In the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: discussion

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! the spell checker wasn't turned on for this file!

Signed-off-by: Doug Davis <duglin@gmail.com>
Signed-off-by: Doug Davis <duglin@gmail.com>

@jskeet jskeet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the separation of HTTP details from the spec. The TOC for http.md looks good, but I haven't read through all the details (it's a lot!) - was this a matter of "lift and shift" or was there rewriting which would be worth reviewing in more detail?

@duglin

duglin commented Sep 25, 2025

Copy link
Copy Markdown
Contributor Author

Mainly "lift and shift".
If you could look at:

  • section titles in spec & http to see if the overall flow makes sense
  • pick one or two http APIs to see if it reads ok and has enough pointers back into spec.md for someone to be able to find all info they may need. They all try to follow a similar pattern.
  • Read the Resource GET and PUT APIs, in particular the $details stuff. I'm concerned it's hard to follow

that would be much appreciated.

@jskeet jskeet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't say this is comprehensive by any means, but a reasonably time-boxed review has at least thrown up some things for discussion. Happy to be overruled on any of them, as normal.

Comment thread core/spec.md Outdated
- [Error Processing](#error-processing)
- [Events](#events)
- [Version Entity](#version-entity)
- [Flags](#flags)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This currently links to the flags bit of capabilities. Renaming the section to "Request flags" would resolve this issue and make it clearer. (Even before trying to click through, the title felt incongruous to me.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread core/spec.md Outdated
- [Sort Flag](#sort-flag)
- [SpecVersion Flag](#specversion-flag)
- [Error Processing](#error-processing)
- [Events](#events)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this deserves its own top-level section, given that it just links elsewhere. The text could potentially be inlined directly, or it could be a subsection - maybe of "Registry Design".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely see your point. I think the main reason I put it as a top-level section is because if someone was coming to the spec to see the list of events I didn't want the section to be hidden in the middle of the TOC. Let's see what other people think.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI: move into "design" section

Comment thread core/http.md Outdated
- [`PUT /`](#put-)
- [`POST /`](#post-)
- [`GET /export`](#get-export)
- [Registry Capability](#registry-capability)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly rename to Registry Capabilities, given that all requests operate on the collection?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent catch!

Comment thread core/http.md Outdated
- [`?filter` Flag](#filter-flag)
- [`?ignoredefaultversionid` Flag](#ignoredefaultversionid-flag)
- [`?ignoredefaultversionsticky` Flag](#ignoredefaultversionsticky-flag)
- [`?ignoreeopch` Flag](#ignoreepoch-flag)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [`?ignoreeopch` Flag](#ignoreepoch-flag)
- [`?ignoreepoch` Flag](#ignoreepoch-flag)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got 'em all

Comment thread core/http.md Outdated
HTTP/1.1 204 No Content
```

## Flags / Query Parameters

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need all the detail here? I wonder whether just saying "Flags are represented by query parameters of the same name" would be enough (and keep a link to the flags in the spec, of course). Otherwise whenever a new flag is added or changed, we'll have to update two places.

If there are aspects to handling of some specific flags that are HTTP-specific, I think those could be called out here, only where necessary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad you focused on this - I was wonder about it.
I like your idea of just calling out the few flags that might need extra text. I'll hold off making the change until the other xReg folks chime in just in case there's a reason to keep the 1:1 mapping.

Comment thread core/http.md Outdated

A server MAY support clients creating or updating a
[Version](./spec.md#version-entity) of a
[Resource](./spec.md#resource-entity) via an HTTP `PATCH` or `POST` directed

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should POST be PUT here, as per the section title? POST is described later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup! done

Comment thread core/http.md Outdated
{ ... Contents of a schema doc excluded for brevity ... }
```

#### `PATCH /<GROUPS>/<GID>/<RESOURCES>/<RID>/versions/<VID>`]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what these ] end-of-line characters are doing here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think those used to have some flags listed at the end. Done

Comment thread core/http.md
[`hasdocument`](./model.md#groupsstringresourcesstringhasdocument)
is set to `false`), then use of the `$details` suffix in a request URL MUST
be treated the same as if it were absent and any URLs in server response
messages referencing that Resource (e.g. `self`) MUST NOT include it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels odd to me. It means that if a resource changes from not having a domain-specific document to having one, a response can change from metadata to document... rather than changing from error to document.

This may all be ancient history and decided by now, but it feels to me like if I ask for something (the document) and that's not supported, that should give an error, rather than a different result.

To put it another way - suppose we'd made the metadata the default, and had $document as a suffix when requesting a document, would we want an explicit $document suffix request to return the metadata if there was no document?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to add some background on this to the primer since other people may wonder about it too, but....

switching between having a domain-specific doc and not is not something that will happen often. It's kind of a big decision point in how someone wants to store their data in the registry. Once that decision is made we had to consider each of those two types of users and what they would expect to be "default" for GET. For the non-domain-specific doc users it's easy since there's no choice... they'll get the metadata.

However, for a user with a domain-specific doc we decided that the information that's most important to them is that doc, not the xReg metadata. We did consider a $document type of flag (for consistency as you suggested) but then consider what a schema user would see/use:

GET https://example.com/schemagroups/group1/schemas/myschema.json$document

yuck! Kind of kills the usability factor. So we ended up where we are.

This is related to why we return the scalar metadata as xRegistry- HTTP headers... just in case they wanted some of the metadata too, but really the doc is still the main reason for the GET. This allows xReg-aware clients and non-xReg-aware client to use the same URL.

I will point out though, we purposely support the idea of $details always being allowed on a Resource/Version URL so that clients shouldn't be required to check the hasdocument flag for each Resource prior to doing a "give me the metadata vie" request.

Does this make sense?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't actually proposing using a $document suffix - I was just trying to introduce it as a thought experiment for how reasonable it is for $details to be effectively optional for any resource that doesn't support a document.

Fundamentally, it feels like this approach reduces predictability. If I see a URL which doesn't have $details, I don't know whether that will return the document or the metadata, unless I know whether the resource supports documents or not.

I suspect it's worth discussing in the meeting - or simply overruling the objection as "this has been thrashed out a lot in the past", which is totally valid.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fundamentally, it feels like this approach reduces predictability. If I see a URL which doesn't have $details, I don't know whether that will return the document or the metadata, unless I know whether the resource supports documents or not.

Yup that's true, and to some extent it's done on purpose. As i mentioned, we wanted the naked URL to always be "the data that's most important to THAT client". And the answer to that question changes based on whether the Resource type has a doc or not. So, here, "usability for client of THIS Resource type" takes precedence over "consistency between doc-Resources and non-doc-Resources".

Let's discuss on the call

Comment thread core/http.md
When a Resource is serialized as its underlying domain-specific document,
in other words `$details` is not appended to its URL path, the HTTP body of
requests and responses MUST be the exact bytes of that document. If the
document is empty, or there is no document, then the HTTP body MUST be empty

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to be clear about the difference between "there is no document" and "the resource type doesn't support documents". They can be easily confused, and we're saying they have very different meanings and results.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This paragraph isn't dealing with "the resource doesn't support docs" though. Do I need to make that clearer or were you just talking about the overall spec in general?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was saying that just a paragraph ago, we're talking about an attribute of hasdocument which really sounds like it's similar to "does this resource have a document" but isn't. Now we're talking about "does this resource have a document" which is different, and I think the two concepts can be confused really easily.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok - let me see if I can work on that...might not be until after the call though

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If right before this paragraph (so at the start of this section), I added this:

This section goes into more details concerning situations where a Resource
type is defined to support domain-specific documents (i.e.
[`hasdocument`](./model.md#groupsstringresourcesstringhasdocument)
is set to `true`.

would that have helped?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mentioned that hasdocument might not be as clear as it could be. See if I used this as the first paragraph of the previous section would help:

In the core specification's
[Resource Metadata vs Resource Document](./spec.md#resource-metadata-vs-resource-document)
section, it explains how Resources types might be defined to optionally have a 
domain-specific document associated with them via their
[`hasdocument` model aspect](./model.md#groupsstringresourcesstringhasdocument`)
being set to `true`. For HTTP, clients indicate whether they want to interact
with the Resource's xRegistry metadata or the Resource's domain-specific 
document by the use of a `$details` suffix on the `<RESOURCE>id` in its URL. 
Presence of the `$details` suffix MUST be interpreted as a request to interact 
with the xRegistry metadata of the Resource, while its absence MUST be
interpreted as a request to interact with the Resource's domain-specific
document.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite possibly. I think naming the attribute "supportsdocuments" instead of "hasdocument" would probably be even clearer, but that ship's sailed :)

Possibly where we mention empty serialization of a resource where the type supports documents but there isn't one for the specific resource, it's worth adding a sentence to highlight that this isn't the same as the resource type not supporting documents.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm supportsdocuments is clearer. We'd need to discuss with the rest of the team but I don't think it's too late to rename it. "hasdoc" is so much easier to say though :-)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mentioned that hasdocument might not be as clear as it could be. See if I used this as the first paragraph of the previous section would help:

I believe I understand that. Basically there are three possibilities:

  • The model's hasdocument is true, and the resource itself has a document attached
  • The model's hasdocument is true, and the resource itself doesn't have a document attached
  • The model's hasdocument is false, so the resource itself can't have a document attached

What I'm saying is that those last two are pretty easily confused. "There is no document" sounds - at first glance - like hasdocument=false, right? But one is on the model, one is on the resource. I think it's okay as a design, but we need to be aware of an audience who isn't completely tuned in to that.

Comment thread core/http.md

Since only some types of attributes can appear as HTTP headers, in order
to manage the full set of attribute the xRegistry metadata view (via use
of the `$details` URL suffix) MUST be used instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless the resource doesn't support a document, in which case a request without a $details suffix should apparently be treated the same way as if $details was specified? (This is an example of why I think that rule is unhelpful.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have that correct. Let's discuss on the call given my explanation in a previous comment.

Signed-off-by: Doug Davis <duglin@gmail.com>
@duglin

duglin commented Sep 25, 2025

Copy link
Copy Markdown
Contributor Author

@jskeet thanks so much for the review! A few good topics to discuss on today's call, the other changes are in the PR.

Comment thread core/spec.md Outdated
This URL MUST NOT include the `$detail` suffix even if the Resource's
`hasdocument` aspect is set to `true`.
Note that if the Resource's
[`hasdocument` aspect][./model.md#groupsstringresourcesstringhasdocument)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[`hasdocument` aspect][./model.md#groupsstringresourcesstringhasdocument)
[`hasdocument` aspect](./model.md#groupsstringresourcesstringhasdocument)

(The link is broken at the moment)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! done

Signed-off-by: Doug Davis <duglin@gmail.com>
Signed-off-by: Doug Davis <duglin@gmail.com>
@duglin

duglin commented Sep 25, 2025

Copy link
Copy Markdown
Contributor Author

Approved on the 9/25 call.
Will address outstanding questions during tomorrow's xReg call.

@duglin
duglin merged commit f769339 into xregistry:main Sep 25, 2025
2 checks passed
@duglin
duglin deleted the Sep8 branch September 25, 2025 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

modelsource=null -> err or erase everything?

4 participants