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

Proposal to create new Message Example Object #606

Closed
char0n opened this issue Aug 4, 2021 · 5 comments
Closed

Proposal to create new Message Example Object #606

char0n opened this issue Aug 4, 2021 · 5 comments
Labels
💡 Proposal (RFC 1) RFC Stage 1 (See CONTRIBUTING.md) stale

Comments

@char0n
Copy link
Collaborator

char0n commented Aug 4, 2021

Current situation is that Message.examples and MessageTrait.examples are using generic type of [Map[string, any]]. Then the description of examples field provide more structure:

An array of key/value pairs where keys MUST be either headers and/or payload. Values MUST contain examples that validate against the headers or payload fields, respectively. Example MAY also have the name and summary additional keys to provide respectively a machine-friendly name and a short summary of what the example is about.

IMHO this description warrants a new Message Example Object with fixed fields, instead of defining the structure with generic type and description. I propose to introduce new Message Example Object with following definition:

Message Example Object

<description placeholder>

Fixed Fields
Field Name Type Description
headers Map[string, any] <description placeholder>
payload any <description placeholder>
name string A machine-friendly name.
summary string A short summary of what the example is about.

Message.examples and MessageTrait.examples type will subsequently change to [Message Example Object]

@char0n char0n added the 💡 Proposal (RFC 1) RFC Stage 1 (See CONTRIBUTING.md) label Aug 4, 2021
@char0n char0n changed the title Proposal to create new MessageExample Object Proposal to create new Message Example Object Aug 4, 2021
@fmvilas
Copy link
Member

fmvilas commented Aug 4, 2021

Yeah, I think it would be a great idea 👍

Just a comment on the process side of things. For the proposal to be Stage 1 (RFC 1) it has to be a PR, not an issue: https://github.com/asyncapi/spec/blob/master/CONTRIBUTING.md#stage-1-proposal. It's ok as I don't want to be picky but thought you'd like to know 😊

@char0n
Copy link
Collaborator Author

char0n commented Aug 4, 2021

Just a comment on the process side of things. For the proposal to be Stage 1 (RFC 1) it has to be a PR, not an issue: https://github.com/asyncapi/spec/blob/master/CONTRIBUTING.md#stage-1-proposal. It's ok as I don't want to be picky but thought you'd like to know

You're absolutely right ;] I'll read the document and align my efforts with the established processes.

@char0n
Copy link
Collaborator Author

char0n commented Aug 10, 2021

Formal proposal has been issued via PR: #609

@github-actions
Copy link

github-actions bot commented Dec 9, 2021

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 Dec 9, 2021
@char0n
Copy link
Collaborator Author

char0n commented Dec 10, 2021

We can close this. The proposal has been accepted, merged and became part of 2.2.0.

@char0n char0n closed this as completed Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 Proposal (RFC 1) RFC Stage 1 (See CONTRIBUTING.md) stale
Projects
None yet
Development

No branches or pull requests

2 participants