Skip to content

Commit

Permalink
chore: following up url parameter issue ICIJ/fluent-swagger-apigen#1
Browse files Browse the repository at this point in the history
resolve version conflict on common-lang3 with openapi/coreNLP
and fix contentSchema -> schema annotation option
  • Loading branch information
bamthomas committed Jan 14, 2025
1 parent f24de8d commit fddc692
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion datashare-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<dependency>
<groupId>org.icij</groupId>
<artifactId>fluent-swagger-apigen</artifactId>
<version>0.2.0</version>
<version>0.3.0</version>
</dependency>

<!-- Logging -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.models.OpenAPI;
import net.codestory.http.annotations.Get;
Expand All @@ -31,7 +32,7 @@ public class OpenApiResource {
* yaml
""",
in = ParameterIn.QUERY)
in = ParameterIn.QUERY, schema = @Schema(implementation = String.class))
}
)
@ApiResponse(responseCode = "200", description="returns the JSON or YAML file")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public ProjectResource(Repository repository, Indexer indexer, PropertiesProvide
public Payload rootProjectOpt(String id) {return ok().withAllowMethods("OPTIONS", "POST", "GET", "DELETE");}

@Operation(description = "Get all user's projects",
requestBody = @RequestBody(content = @Content(mediaType = "application/json", contentSchema = @Schema(implementation = Project[].class)))
requestBody = @RequestBody(content = @Content(mediaType = "application/json", schema = @Schema(implementation = Project[].class)))
)
@ApiResponse(responseCode = "200", useReturnTypeSchema = true)
@Get("/")
Expand All @@ -88,7 +88,7 @@ public List<Project> getProjects(Context context) {
}

@Operation(description = "Creates a project",
requestBody = @RequestBody(content = @Content(mediaType = "application/json", contentSchema = @Schema(implementation = Project.class)))
requestBody = @RequestBody(content = @Content(mediaType = "application/json", schema = @Schema(implementation = Project.class)))
)
@ApiResponse(responseCode = "201", description = "if project and index have been created")
@ApiResponse(responseCode = "400", description = "if project name is empty")
Expand Down Expand Up @@ -130,7 +130,7 @@ public Project projectRead(String id, Context context) {
}

@Operation(description = "Updates a project",
requestBody = @RequestBody(content = @Content(mediaType = "application/json", contentSchema = @Schema(implementation = Project.class)))
requestBody = @RequestBody(content = @Content(mediaType = "application/json", schema = @Schema(implementation = Project.class)), required = true)
)
@ApiResponse(responseCode = "200", description = "if project has been updated")
@ApiResponse(responseCode = "404", description = "if project doesn't exist in database")
Expand Down
5 changes: 4 additions & 1 deletion datashare-nlp-corenlp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
</exclusion>

<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down

0 comments on commit fddc692

Please sign in to comment.