tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TOMEE-2289) MicroProfile OpenAPI Example
Date Wed, 02 Jan 2019 12:39:00 GMT

    [ https://issues.apache.org/jira/browse/TOMEE-2289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16732018#comment-16732018
] 

ASF GitHub Bot commented on TOMEE-2289:
---------------------------------------

Github user ivanjunckes commented on a diff in the pull request:

    https://github.com/apache/tomee/pull/340#discussion_r244724385
  
    --- Diff: examples/mp-openapi/README.adoc ---
    @@ -0,0 +1,112 @@
    +:index-group: MicroProfile
    +:jbake-type: page
    +:jbake-status: unpublished
    +
    +# Microprofile OpenAPI
    +This is an example on how to use microprofile OpenAPI in TomEE.
    +
    +== Run the application:
    +mvn clean install tomee:run 
    +
    +Within the application there is an endpoint that will give you weather based on day.
    +
    +== Request
    +....
    +GET http://localhost:8080/mp-openapi/weather/status/{today}
    +
    +
    +== Response
    +....
    +{today} is a sunny day.
    +
    +
    +== OpenAPI
    +
    +OpenAPI is a spec for natively producing OpenAPI v3 documents from JAX-RS applications.

    +There exists an endpoint /openApi which gives the OpenAPI document based on Accept request
header.
    --- End diff --
    
    "/openApi" is not a valid path, it must be "/openapi". Path is casesensitive.


> MicroProfile OpenAPI Example
> ----------------------------
>
>                 Key: TOMEE-2289
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2289
>             Project: TomEE
>          Issue Type: Sub-task
>          Components: Examples and Documentation
>    Affects Versions: 8.0.0-M1
>            Reporter: Ivan Junckes Filho
>            Assignee: Ivan Junckes Filho
>            Priority: Minor
>              Labels: examples, pull-request-available
>
> We would like to write an example for MicroProfile OpenApi.
> Here is the MicroProfile specification url:
> [https://download.eclipse.org/microprofile/microprofile-open-api-1.0.1/microprofile-openapi-spec.html]
> Fork / clone the TomEE project from here:
> [https://github.com/apache/tomee]
> Example name should be _mp-openapi_, following the standard already in the project.
> All the examples are in:
> [https://github.com/apache/tomee/tree/master/examples]
> See this example of Microprofile Metrics for reference:
> [https://github.com/apache/tomee/tree/master/examples/mp-metrics-counted]
>  
> What you have to do is:
> 1 - Create a JAX-RS endpoint with some methods (Using the same domain from metrics -
WeatherService would be good)
> 2 - Annotate with OpenApi annotations
> 3 - Write a test to assert the response in JSON and YAML
> 4 - Make sure all the tests pass
> After that submit a PR and we'll review it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message