Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configured Swagger in the project #481

Closed
wants to merge 1 commit into from
Closed

Configured Swagger in the project #481

wants to merge 1 commit into from

Conversation

muaz-32
Copy link

@muaz-32 muaz-32 commented Mar 20, 2024

Summary

The Swagger plugin for Javalin is used to configure Swagger. However the annotated endpoints are shown in the Swagger UI but annotations are unable to access any user-defined class in the annotation, as a result, the request format is not shown properly.

Fixes: #478

Changes

The Javalin Openapi plugin is used to generate endpoints' documentation. However the plugin is for Javalin 5 or more, and their documentation suggests to use the javalin-rfc openapi plugin for versions below Javalin 5.
ref: https://github.com/javalin/javalin-openapi/wiki/1.-Installation

For installation this documentation is followed:
https://github.com/javalin/javalin-openapi/tree/99fe1f8eb1df46a1687653bf433d082d7115d426

But the javalin-rfc plugins are located at Reposilite repo. So the build.gradle file in the root is configured to search the Reposilite repo for plugins (ref: https://mvnrepository.com/artifact/io.javalin-rfc/openapi-annotation-processor/1.1.7).

And the OpenApi annotation is used in the request handler to generate docs. However, the annotation is unable to access any user-defiend class in the annotation. As a result, the request format is not generated properly. With further modifications this can be improved. Currently, only the '/createAdapter' endpoint's docs has been created to verify.

ToDo

  • Add the request format
  • Add the response format if possible
  • Add annotations for each endpoint
  • ...

I have used the swagger plugin for Javalin to configure Swagger. However the annotated endpoints are shown in the Swagger UI but annotations are unable to access any user defined class in the annotation, as a result the request format is not shown properly.
@muaz-32
Copy link
Author

muaz-32 commented Mar 20, 2024

hi @hennlo, can you please help me on the request format class unable to access problem?

@datomo datomo marked this pull request as draft April 3, 2024 14:44
@muaz-32 muaz-32 closed this Apr 16, 2024
@muaz-32
Copy link
Author

muaz-32 commented Apr 16, 2024

This pull is requested again from #490. Because this pull is done from the master branch, and it is not merged. So it is difficult to work with other issues. Sorry for the inconvenience. @datomo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant