https://github.com/thiagolvlsantos/rest-storage
A generic endpoint for objects storages.
https://github.com/thiagolvlsantos/rest-storage
openapi
Last synced: 27 days ago
JSON representation
A generic endpoint for objects storages.
- Host: GitHub
- URL: https://github.com/thiagolvlsantos/rest-storage
- Owner: thiagolvlsantos
- Created: 2022-02-24T23:42:46.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-13T23:07:28.000Z (over 1 year ago)
- Last Synced: 2025-07-30T11:40:59.441Z (11 months ago)
- Topics: openapi
- Language: Java
- Homepage: https://thiagolvlsantos.github.io/rest-storage
- Size: 431 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rest-storage
[](https://github.com/thiagolvlsantos/rest-storage/actions/workflows/maven.yml)
[](https://github.com/thiagolvlsantos/rest-storage/actions/workflows/codeql.yml)
[](https://github.com/thiagolvlsantos/rest-storage/actions/workflows/sonar.yml)
[](https://sonarcloud.io/dashboard?id=thiagolvlsantos_rest-storage)
[](https://sonarcloud.io/dashboard?id=thiagolvlsantos_rest-storage)
[](https://repo1.maven.org/maven2/io/github/thiagolvlsantos/rest-storage/)
[](http://www.apache.org/licenses/LICENSE-2.0)
A generic endpoint to storage of objects.
## Usage
Include latest version [](https://repo1.maven.org/maven2/io/github/thiagolvlsantos/rest-storage/) to your project.
```xml
io.github.thiagolvlsantos
rest-storage
${latestVersion}
```
## Add `@EnableRestStorage` to you app.
```java
...
@EnableRestStorage
public class Application {
...main(String[] args) {...}
}
```
## Configuration
Example using YAMLs configuration file.
```yaml
# OpenAPI params
springdoc:
api-docs:
path: /swagger
swagger-ui:
path: /swagger/ui
operationsSorter: alpha # Sorting endpoints alphabetically
tagsSorter: alpha # Sorting tags alphabetically
```
## Rest Handler
Extend `AbstractRestHandler` to receive all events based on `entity` type. You can, as example, implement a service for a given entity based on `file-storage` or using `jpa + hibernate` to save objects.
## Endpoints
According to this setup, after server start, the OpenApi interface will be available at [http://localhost:8080/swagger](http://localhost:8080/swagger) and Swagger UI at [http://localhost:8080/swagger/ui](http://localhost:8080/swagger/ui).

## Build
Localy, from this root directory call Maven commands or `bin/` at your will...