Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The request payload to create a release unnecessarily accepts a URI template #9

Open
odrotbohm opened this issue Jan 23, 2023 · 1 comment

Comments

@odrotbohm
Copy link

The specifications of the apiDocUrl and referenceDocUrl fields of request payload to add a new release are unnecessarily vague. There's no real need for a client to submit a {version} template variable, as it could just send an expanded URL, which would allow the type of the field to be tightened to URL.

A backwards-compatible way of supporting this would be to accept optional fields apiDoc and referenceDoc to only accept URLs if given. This step could also be used to rather let a referenceDocs expect an array of objects, each with an href and type field, to allow different types (HTML, PDF) of reference docs to be submitted.

{
  …,
  "apiDoc" : "",
  "referenceDocs" : [
    { "href" : "", "type" : "" },
    { }
  ]
}

An apiDoc would then trump apiDocUrl. A referenceDocs would trump a referenceDoc (this one defaulting to a single entry with type to HTML). A canonical response format is described in #2.

@odrotbohm
Copy link
Author

Just for reference: I checked the Spring Data release tooling, and that sends expanded URLs for apiDocUrl and referenceDocUrl already.

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

No branches or pull requests

1 participant