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

Clarification on URL and it's resolution rules #674

Closed
char0n opened this issue Dec 14, 2021 · 8 comments · Fixed by #842
Closed

Clarification on URL and it's resolution rules #674

char0n opened this issue Dec 14, 2021 · 8 comments · Fixed by #842

Comments

@char0n
Copy link
Collaborator

char0n commented Dec 14, 2021

Hello,

In the AsyncAPI 2.2.0 spec, there are multiple fields that have description containing: MUST be in the format of a URL. These fields include:

All URL fields

  • Info.termsOfService
  • Contact.url
  • License.url
  • ExternalDocumentation.url
  • OAuthFlow.authorizationUrl
  • OAuthFlow.tokenUrl
  • OAuthFlow.refreshUrl

Does MUST be in the format of a URL mean that these fields allow only absolute URL as defined by rfc3986 section 4.3? It looks like that from all the examples in spec and given that the only field inside spec that explicitly mentions relative URLs is Server.url field. So I'm assuming only absolute URLs are allowed here, am I right?

Server.url field

Server.url field looks like an exception to URL handling within the spec and claims that URL MAY be relative. I assume that being relative complies with rfc3986 section 4.2?


I'm doing a lot of assumptions here. It would be great to have this all specified explicitly so that there is not place for assumptions and different interpretations. I'm willing to issue a clarification PR after we discuss this further.

PS: why not allow all URL fields to be relative? If the URL is relative it will be resolved using one of the Server.url (after it has been resolved itself against location where the AsyncAPI document is being served) as a Base URL. If no Server Object is defined, then the Base URL is automatically resolved against the location where the AsyncAPI document is being served.

Thanks!

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Apr 14, 2022
@derberg
Copy link
Member

derberg commented Apr 20, 2022

Hey, you did not come to community meeting and somehow it got lost, sorry. Stale bot to the rescue 🚀 😄

More details in JSON Schema -> URL shoudl be of uri format so RFC3986. You want it explicit in the spec markdown file too, right? IMHO it definitely makes sense, users should not be forced to check JSON Schema

@github-actions github-actions bot removed the stale label Apr 21, 2022
char0n added a commit to char0n/spec that referenced this issue May 4, 2022
char0n added a commit to char0n/spec that referenced this issue May 4, 2022
@char0n
Copy link
Collaborator Author

char0n commented May 4, 2022

More details in JSON Schema -> URL shoudl be of uri format so RFC3986. You want it explicit in the spec markdown file too, right?

Yep, I expect the markdown file to be the single source of truth. I've created #780 to make it explicit.

IMHO it definitely makes sense, users should not be forced to check JSON Schema

Cool, I've created a PR that remedies the unclarity.

@github-actions
Copy link

github-actions bot commented Sep 2, 2022

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added stale and removed stale labels Sep 2, 2022
@char0n char0n mentioned this issue Sep 6, 2022
61 tasks
@char0n
Copy link
Collaborator Author

char0n commented Sep 7, 2022

Closing as #782 has been merged to master as editorial change.

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 3.0.0-next-major-spec.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 2.5.0-next-spec.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@derberg
Copy link
Member

derberg commented Jan 31, 2023

Recent comments about the release from the bot were added by mistake. More details in #899

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants