Skip to content

Conversation

irvinesunday
Copy link
Contributor

Closes #103
Closes https://github.com/microsoftgraph/microsoft-graph-devx-api/issues/529

  • Retrieves operation descriptions from vocabulary annotations of IEdmVocabularyAnnotatable elements.
  • Tests have been updated to validate this feature.

operation.Summary = "Get entity from " + EntitySet.Name + " by key";

IEdmEntityType entityType = EntitySet.EntityType();

Copy link
Contributor

Choose a reason for hiding this comment

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

There's a line to set the description in the base class.

I don't know why do you want to rewrite it using the entity type.

Maybe you need to change that logic:

  1. If we have description for the entity set, use it
  2. otherwise, if we have description for entity type, use it
  3. otherwise, leave it empty or use a default string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are we not expecting a scenario where we have descriptions for both entity set and entity? In such a scenario, we would end up setting entity set descriptions for entities, even though they have their own annotated descriptions.

Copy link
Contributor

Choose a reason for hiding this comment

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

You mean for "single entity request, the annotation should from entity type?".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Typically, it should comes from entity set, not from entity type.
However, it seems we can't distinguish it from entity set or single entity.
So, I am ok for your changes.

@xuzhg xuzhg merged commit b1fed42 into master May 5, 2021
@baywet baywet deleted the is/description-vocab branch December 24, 2024 14:37
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.

Output OpenAPI path operations descriptions from vocabulary annotations

2 participants