-
Notifications
You must be signed in to change notification settings - Fork 75
Generate swagger from a package and update swagger for delete-environ… #354
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, optional minor fixes as you see fit
.filterInputsBy(new FilterBuilder().includePackage(pkg))); | ||
Set<Class<?>> springMVCClasses = | ||
reflections.getTypesAnnotatedWith( | ||
org.springframework.web.bind.annotation.RestController.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, we don't have a direct dependency on this in the build.gradle
, is it coming in as a transitive dependency? Might be worth adding an explicit dependency in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it comes from the "swagger-maven-plugin", which we use to generate swagger from Spring mvc.
Not sure what's the value we add for explicit dependency for spring-web. I would see it's better to use the transitive dependency from swagger to avoid potential problem to maintain the same spring version within swagger or different spring versions.
frontend-service/build.gradle
Outdated
@@ -60,15 60,8 @@ task swagger(type: GenerateSwaggerModel, dependsOn: classes) { | |||
scanClasspath = project.sourceSets.main.runtimeClasspath | |||
|
|||
// TODO: Specify API classes by package rather than name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably remove this TODO now ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do
/** A list of class names to scan for Swagger annotations */ | ||
@Input private List<String> apiClasses = new ArrayList<>(); | ||
/** A list of package names to scan for swagger annotations */ | ||
@Input private List<String> apiPackages = new ArrayList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Summary
Update the swagger file for delete-environment API.
Testing
gradle build
Licensing
This contribution is under the terms of the Apache 2.0 License: Yes