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

Add annotation examples to the Javadoc #405

Open
lauracowen opened this issue Jan 15, 2020 · 3 comments
Open

Add annotation examples to the Javadoc #405

lauracowen opened this issue Jan 15, 2020 · 3 comments

Comments

@lauracowen
Copy link

lauracowen commented Jan 15, 2020

This wiki page provides a set of useful annotation examples, but that information would be more useful to the developer at development time if it were available in the Javadoc. For example, the @CallbackOperation annotation's Javadoc would be a lot clearer and easier to follow if the example shown on the wiki page were provided in the section of the Javadoc that currently just says "Describes a single API callback operation.":


The CallbackOperation annotation represents an operation that will be invoked during the callback.

@CallbackOperation( method = "POST",
	summary = "A Brief Description Of What The MethodDoes",
	description = "A verbose description of the callback operation behavior",
	externalDocs = @ExternalDocumentation(description = "A short description of the target documentation.",
		url = "www.urlfortargetdocumentation.com"
	),
	parameters = { @Parameter(name = "Parameter's name")},
	requestBody = @RequestBody(description = "A brief description of the request body"),
	responses = { @APIResponse(reponseCode = "200")},
	security = { @SecurityRequirement(name = "oauth2",
		scopes = "read:reviews"
	)},
	extension = { @Extension(name = "x-header",
		value = "The extension value"
	)}
)

This could be done for all of the annotations' Javadoc.

@lauracowen
Copy link
Author

Possibly also provide the output examples from here too, so the developer can see what the output is for the annotations they provide? https://github.com/eclipse/microprofile-open-api/wiki/Static-File-Samples

@arthurdm
Copy link
Member

Thanks @lauracowen - this sounds like a good idea to me.

@arthurdm
Copy link
Member

We agreed to do this in today's hangout.

@arthurdm arthurdm added this to the MP OpenAPI 2.0 milestone Apr 14, 2020
@MikeEdgar MikeEdgar removed this from the MP OpenAPI 2.1 milestone Feb 21, 2022
Azquelt pushed a commit to Azquelt/microprofile-open-api that referenced this issue Mar 17, 2022
…lrye-smallrye-parent-21

Bump smallrye-parent from 20 to 21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants