Skip to content

Swaggy-Swagger/swagger-custom-java

Repository files navigation

Swaggy Swagger



Swaggy-Swagger-Logo

Swaggy Swagger

Jitpack Release License Fossa License Scan FOSSA Status github release github last release date
github contributors github stars github discussions


English | 한국어

Overview

Swaggy-Swagger is a library designed to enhance the functionality and user experience of the popular API documentation tool, Swagger. See Swaggy-Swagger README.md for more details.

Demo Website

swaggy-swagger.vercel.app

Demo Video

Requirements

  • Java 17 or higher: This project requires Java version 17 or later.
  • Spring Boot 3.x: Ensure that you are using Spring Boot version 3.x for compatibility.

Installation

Add dependency to your project

repositories {
    mavenCentral()
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.Swaggy-Swagger:swagger-custom-java:1.0.0'
}

How to Apply Features

Order controller methods by code line number

import io.swaggy.swagger.customlib.config.SwaggyConfig;
import io.swaggy.swagger.customlib.utils.OpenApiChangeTracker;
import org.springdoc.core.customizers.OpenApiCustomizer;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

// Import 'SwaggyConfig' class to your OpenApi configuration class.
@Configuration
@Import(SwaggyConfig.class)
public class YourOpenApiConfig {
}

Track and save changes in api endpoints, parameters, dtos, etc

import io.swaggy.swagger.customlib.utils.OpenApiChangeTracker;
import org.springdoc.core.customizers.OpenApiCustomizer;
import org.springframework.context.annotation.Configuration;

@Configuration
public class YourOpenApiConfig {
    
    // Register 'OpenApiCustomizer' Bean to your OpenApi configuration class.
    @Bean
    public OpenApiCustomizer openApiCustomizer() {
        return new OpenApiChangeTracker();
    }
}

Ways to contribute

We always welcome your contributions!

  • If you would like to contribute to the frontend (UI), you can see swaggy-ui for more details.

  • Else, if you want to contribute to the backend (server-side), which is this repository, please refer to CONTRIBUTING.md.

Contributors

Thank you to everyone who contributed to our project.

Made with contrib.rocks

License

Swaggy-Swagger is licensed under the Apache License, Version 2.0.
See the LICENSE file for more details.

FOSSA Status

Contact