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.

Allow exclusion of endpoints

See original GitHub issue

Filtering/exclusion of endpoints should be allowed.

It would be nice to be able to filter which endpoints should be exported to Swagger.yaml using the @ApiModelProperty(access="...") annotation.

Following is an example of my proposal:

@Path(TestClass.PATH)
public class TestClass {
    static final String PATH = "/path/goes/here";
    @Get
    @ApiOperation( value= "I'm hidden from the public")
    @ApiModelProperty(name = "hiddenMethod", access="internal")
    public Response hiddenMethod() {
        ...
    }
    @Post
    @ApiOperation( value= "Go ahead. Use me")
    public Response freeForAll(Thingy thingy) {
        ...
    }
}

POM:

<plugins>
    <plugin>
        <artifactId>swagger-maven-plugin</artifactId>
        ...
        <configuration>
            <apiSources>
                <apiSource>
                    <locations>
                        example.endpoints
                    </locations>
                    <apiModelPropertyAccessExclusions>
                        <apiModelPropertyAccessExclusion>
                            internal
                        </apiModelPropertyAccessExclusion>
                    </apiModelPropertyAccessExclusions>
                    <swaggerDirectory>public</swaggerDirectory>
                </apiSource>
                <apiSource>
                    <locations>
                        example.endpoints
                    </locations>
                    <swaggerDirectory>internal</swaggerDirectory>
                </apiSource>
            </apiSources>
        </configuration>
    </plugin>
</plugins>

This would produce two yaml-files, one including the /path/goes/here-GET and one excluding it

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
zarub2kcommented, Jul 5, 2017

@APIOperation(hidden=true) with this annotation we can ignore the rest endpoints while generating Swagger

1reaction
jahlbornGcommented, Mar 18, 2021

we would also love for a good way to generate public and private docs separately. we use the hidden flag on a lot of stuff. it’d be nice to simple have an option like “ignore hidden” which would include everyting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage exclusions for Microsoft Defender for Endpoint and ...
Allow – Defender for Endpoint won't block files, IP addresses, URLs/domains, or certificates that have Allow indicators. · Audit · Block and ...
Read more >
Configure and Identify Cisco Secure Endpoint Exclusions
An exclusion set is a list of directories, file extensions, or threat names that you do not want the Secure Endpoint Connector to...
Read more >
6 -How to Create Exclusions Policy in Microsoft Defender for ...
How to Create Exclusions Policy in Microsoft Defender for Endpoints (Deep ... MDE Tutorial 8 -How to Enable Tamper Protection.
Read more >
Excluded endpoints — envoy 1.25.0-dev-843308 documentation
Excluded hosts allow scaling up or down the number of hosts for a given cluster without entering panic mode or triggering priority spillover....
Read more >
My learnings on Microsoft Defender for Endpoint and Exclusions
My learnings on Microsoft Defender for Endpoint and Exclusions ... file is allowed by the Microsoft Defender Antivirus exclusion, then Allow
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