Collection Example plugin for Springfox

Collection Example plugin for Springfox.

License

License

GroupId

GroupId

com.github.aaitmouloud
ArtifactId

ArtifactId

springfox-collection-example-plugin
Last Version

Last Version

3.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Collection Example plugin for Springfox
Collection Example plugin for Springfox.
Project URL

Project URL

https://github.com/aaitmouloud/springfox-collection-example-plugin
Source Code Management

Source Code Management

https://github.com/aaitmouloud/springfox-collection-example-plugin

Download springfox-collection-example-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.aaitmouloud/springfox-collection-example-plugin/ -->
<dependency>
    <groupId>com.github.aaitmouloud</groupId>
    <artifactId>springfox-collection-example-plugin</artifactId>
    <version>3.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.aaitmouloud/springfox-collection-example-plugin/
implementation 'com.github.aaitmouloud:springfox-collection-example-plugin:3.0.0'
// https://jarcasting.com/artifacts/com.github.aaitmouloud/springfox-collection-example-plugin/
implementation ("com.github.aaitmouloud:springfox-collection-example-plugin:3.0.0")
'com.github.aaitmouloud:springfox-collection-example-plugin:jar:3.0.0'
<dependency org="com.github.aaitmouloud" name="springfox-collection-example-plugin" rev="3.0.0">
  <artifact name="springfox-collection-example-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.aaitmouloud', module='springfox-collection-example-plugin', version='3.0.0')
)
libraryDependencies += "com.github.aaitmouloud" % "springfox-collection-example-plugin" % "3.0.0"
[com.github.aaitmouloud/springfox-collection-example-plugin "3.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
io.springfox : springfox-spi jar 3.0.0
io.springfox : springfox-swagger-common jar 3.0.0

runtime (1)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-databind jar 2.10.3

test (6)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar 5.7.0
org.junit.jupiter : junit-jupiter-engine jar 5.7.0
org.junit.jupiter : junit-jupiter-params jar 5.7.0
org.mockito : mockito-core jar 3.6.0
org.mockito : mockito-junit-jupiter jar 3.6.0
org.slf4j : slf4j-simple jar 1.7.30

Project Modules

There are no modules declared in this project.

Collection Example plugin for Springfox

Build Status

What does it do

It allows you to have a correct example generated for all java.util.Collection typed properties.

For example, this:

@ApiModelProperty(value ="my property description", example = "2019-12-20T12:00:00")
@NotNull
private List<LocalDateTime> dates;

Would generate this:

{
    "properties": {
        "autresDates": {
            "type": "array",
            "example": [
                "2019-12-20T12:00:00"
            ],
            "description": "my property description",
            "items": {
                "type": "string",
                "format": "date-time"
            }
        }
    }
}

Usage

Maven

Add this to your pom.xml in the <dependencies>

<dependency>
    <groupId>com.github.aaitmouloud</groupId>
    <artifactId>springfox-collection-example-plugin</artifactId>
    <version>3.0.0</version>
</dependency>

Gradle

Add this to your dependencies in your build.gradle

implementation 'com.github.aaitmouloud:springfox-collection-example-plugin:3.0.0'

Spring

Just add the springfox.collection.example.plugins package to your Spring context

For example, while using Spring Boot:

@ComponentScan({"springfox.collection.example.plugins"})
public class MyConfigurationClass {
}

Contributors

  • @aaitmouloud
  • @geld0r : PR #5

See also

Versions

Version
3.0.0
2.9.2