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

Interface Annotations #3186

Merged
merged 2 commits into from
Nov 23, 2020
Merged

Conversation

matthawley
Copy link
Contributor

We are in need of annotating the generated interface with our own attributes based on document level extension data to be able to handle more dynamic client creation.

Additions

  1. Adding ExtensionData to the client template model.
  2. Modifying the client interface template to call a new client interface annotations template.

Example Usage

Input from Client.Interface.Annotations.liquid

[Services.Documentation.ShortName("{{ ExtensionData["x-service-short-name"] }}")]

Generated Output

[Services.Documentation.ShortName("discovery")]

@RicoSuter
Copy link
Owner

Maybe we should do the same with Client.Class.Annotations just that its consistent?

@matthawley
Copy link
Contributor Author

@RicoSuter added the class annotations.

@RicoSuter RicoSuter merged commit b63faa8 into RicoSuter:master Nov 23, 2020
@RicoSuter
Copy link
Owner

Thanks for the PR.

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