You are expect
{
"id": 1111111111111111111
}
But got
{
"id": 1111111111111111200
}
- Java
- Maven
- Nodejs
- Git
- Clone repository https://github.com/swagger-api/swagger-ui and checkout required version tag.
- Install dependencies:
npm install
- Install additional dependency https://github.com/sidorares/json-bigint
npm install json-bigint
- Navigate to response-body.jsx
- Add import json-bigint
import JSONbig from "json-bigint"
- Change the row in response-body.jsx
should be changed to this one
body = JSON.stringify(JSON.parse(content), null, " ")
body = JSONbig.stringify(JSONbig.parse(content), null, " ")
- Build project
npr run build
- you will get compiled projectdist
directory.
- Clone https://github.com/webjars/swagger-ui
- Create new directory in project like
ui
- Copy
dist
(you have got it after build UI project) toui
directory - Edit pom.xml
<!--To avoid conflicts with original lib, change group name--> <groupId>com.myawesome.group.name</groupId> ... <!-- Remove SCM --> <scm> <url>http://github.com/webjars/swagger-ui</url> <connection>scm:git:https://github.com/webjars/swagger-ui.git</connection> <developerConnection>scm:git:https://github.com/webjars/swagger-ui.git</developerConnection> <tag>HEAD</tag> </scm> ... <!--Change ant command--> <target> <echo message="moving resources" /> <move todir="${destDir}"> <fileset dir="./ui/dist" /> </move> </target> ... <!--Remove plugin--> <plugin> <groupId>org.sonatype.plugins</groupId> <artifactId>nexus-staging-maven-plugin</artifactId> <version>1.6.13</version> <extensions>true</extensions> <configuration> <serverId>sonatype-nexus-staging</serverId> <nexusUrl>https://oss.sonatype.org/</nexusUrl> <autoReleaseAfterClose>true</autoReleaseAfterClose> </configuration> </plugin>
- Build maven project
mvn install
- to test localy ormvn deploy
to push it to registry. (!) after buildui/dist
- will be cleaned up. Copydist
directroy once again or change ant command tocopy
instaed ofmove
- In your awesome project add exclusion of webjars:swagger-ui. Edit pom.xml
<dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-ui</artifactId> <exclusions> <exclusion> <groupId>org.webjars</groupId> <artifactId>swagger-ui</artifactId> </exclusion> </exclusions> </dependency>
- Instead of org.webjars:swagger-ui - add new dependecy that you build abowe
<dependency> <groupId>com.myawesome.group.name</groupId> <artifactId>swagger-ui</artifactId> </dependency>
Run your project and enjoy.