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

feat: add reference related metadata to namespaces #538

Merged
merged 3 commits into from
Aug 2, 2021
Merged

Conversation

frantuma
Copy link
Member

No description provided.

@frantuma frantuma requested a review from char0n July 30, 2021 06:39
Copy link
Member

@char0n char0n left a comment

Choose a reason for hiding this comment

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

If the purpose of this PR was to provide complete referencing metadata support via metadata, then we're still missing some objects that can support referenceing

This is for openapi:

const canHaveReference = (element) => {
  return (
    isReferenceElement(element) ||
    (isSchemaElement(element) && isStringElemenet(element.$ref)) ||
    (isExampleElement(element) && isStringElement(element.externalValue)) ||
    (isPathItemElement(element) && isStringElement(elemenet.$ref)) ||
    (isLinkElement(element) && isStringElement(element.operationRef))
  );
};

Asyncapi have Reference Object and Channel Item Object

methods: {
StringElement(stringElement: StringElement) {
this.element = stringElement.clone();
this.element.classes.push('reference-field');
Copy link
Member

Choose a reason for hiding this comment

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

Note: naming

// get current $ref keyword
const $ref = objectElement.get('$ref')?.toValue();

// if it's a non empty strings
Copy link
Member

@char0n char0n Jul 30, 2021

Choose a reason for hiding this comment

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

nitpick: would drop the comment here; it doesn't express anything else then the following declarative assertion

@swagger-api swagger-api deleted a comment from frantuma Jul 30, 2021
@char0n char0n merged commit 808073f into master Aug 2, 2021
@char0n char0n deleted the moar-meta branch August 2, 2021 14:17
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.

2 participants