question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extensions via Annotations

See original GitHub issue

Annotations for models that are Extensible do not provide a way to list the extensions. Opening this issue for discussion in case this was not by design (I didn’t see any issues about it).

I would expect to see something like Extension[] extensions() default {} in each of the annotations where the equivalent model is Extensible.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
MikeEdgarcommented, Mar 1, 2021

@ambition-consulting - as you have found, what you want to do can’t be done (yet) via annotations. Your best bet with the current version of MP is to utilize the model to programmatically add the extensions.

public class ExtensionFilter implements OASFilter {
    @Override
    public void filterOpenAPI(OpenAPI model) {
        model.getInfo().addExtension("x-logo", "https://example.com/your-logo.png");
    }
}

This particular issue is to track the change for future releases of the specification to support using annotations for this same functionality. The use of $ref for arbitrary elements is also not supported, e.g. for info:description.

0reactions
MikeEdgarcommented, Feb 6, 2022

If done for 3.1, the current functionality of allowing @Extension on fields, methods, params, and types needs to be kept and deprecated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

2 Annotation Extensions Reference
EclipseLink includes the following annotation extensions for using partitions: @HashPartitioning. @Partitioned. @Partitioning. @PinnedPartitioning.
Read more >
7 of the Best Google Chrome Extensions to Annotate Text on ...
1. Hypothesis – Web & PDF Annotation · 2. Awesome Screenshot · 3. Yawas – Web Highlighter · 4. Kami – PDF and...
Read more >
How to annotate on Google Chrome with the MarkUp.io ...
1. Navigate to the webpage you would like to markup. · 2. Open the extension and click 'Create MarkUp.' · 3. This will...
Read more >
Annotate: Web Annotations with Screen Sharing
Annotate web pages, PDFs, Google Slides, and Google Docs to improve engagement. Annotate in Google Meet when screen sharing.
Read more >
The 7 Best Annotation Tools for Google Chrome - MakeUseOf
With tools that allow you to mark up items quickly and easily, Chrome offers a nice selection of extensions. 1. Awesome Screenshot. Awesome ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found