Skip to content

LeakyAbstractions/result-example-micronaut

Build Status Gradle Micronaut Maven Central Benchmark Report

Example Micronaut Application Using Results

This is a simple implementation of a Petstore server powered by Micronaut.

The purpose of this example application is to demonstrate how to make use of Result libraries in projects based on Spring Boot. For the sake of brevity, the Petstore spec is implemented partially.

Getting Started

Build and run the application.

./gradlew run

This will start a stand-alone server on port 8080.

Testing the Server

Once started, you can interact with the API.

curl -s -H 'x-type: local' http://localhost:8080/pet/0

You should see a JSON response like this:

{"version":"1.0","result":{"success":{"id":0,"name":"Rocky","status":"AVAILABLE"}}}

Using Swagger-UI

You can navigate to http://localhost:8080/ to inspect the API using an interactive UI.

Swagger-UI

Looking for Support?

We'd love to help. Check out the support guidelines.

Contributions Welcome

If you'd like to contribute to this project, please start here.

Code of Conduct

This project is governed by the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.

Author

Copyright 2024 Guillermo Calvo.

License

This project is licensed under the Apache License, Version 2.0 (the "License"); you may not use it except in compliance with the License.

You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and limitations under the License.

Permitted:

  • Commercial Use: You may use this project and derivatives for commercial purposes.
  • Modification: You may modify this project.
  • Distribution: You may distribute this project.
  • Patent Use: This license provides an express grant of patent rights from contributors.
  • Private Use: You may use and modify this project without distributing it.

Required:

  • License and Copyright Notice: If you distribute this project you must include a copy of the license and copyright notice.
  • State Changes: If you modify and distribute this project you must document changes made to this project.

Forbidden:

  • Trademark use: This license does not grant any trademark rights.
  • Liability: The project author cannot be held liable for damages.
  • Warranty: This project is provided without any warranty.