From commits-return-46021-archive-asf-public=cust-asf.ponee.io@tomee.apache.org Wed Jan 2 13:39:06 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 6D8EF18067E for ; Wed, 2 Jan 2019 13:39:06 +0100 (CET) Received: (qmail 27516 invoked by uid 500); 2 Jan 2019 12:39:05 -0000 Mailing-List: contact commits-help@tomee.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tomee.apache.org Delivered-To: mailing list commits@tomee.apache.org Received: (qmail 27506 invoked by uid 500); 2 Jan 2019 12:39:05 -0000 Delivered-To: apmail-openejb-commits@openejb.apache.org Received: (qmail 27503 invoked by uid 99); 2 Jan 2019 12:39:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jan 2019 12:39:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 03B36180E6F for ; Wed, 2 Jan 2019 12:39:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id BVu6p6nMhblK for ; Wed, 2 Jan 2019 12:39:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 98AED6112A for ; Wed, 2 Jan 2019 12:39:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7C7B2E00E1 for ; Wed, 2 Jan 2019 12:39:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C061F253DC for ; Wed, 2 Jan 2019 12:39:00 +0000 (UTC) Date: Wed, 2 Jan 2019 12:39:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: commits@openejb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (TOMEE-2289) MicroProfile OpenAPI Example MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TOMEE-2289?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1673= 2018#comment-16732018 ]=20 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 =20 --- 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. + +=3D=3D Run the application: +mvn clean install tomee:run=20 + +Within the application there is an endpoint that will give you weather= based on day. + +=3D=3D Request +.... +GET http://localhost:8080/mp-openapi/weather/status/{today} + + +=3D=3D Response +.... +{today} is a sunny day. + + +=3D=3D OpenAPI + +OpenAPI is a spec for natively producing OpenAPI v3 documents from JAX= -RS applications.=20 +There exists an endpoint /openApi which gives the OpenAPI document bas= ed on Accept request header. --- End diff -- =20 "/openApi" is not a valid path, it must be "/openapi". Path is casesens= itive. > 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=C2=A0write an example for MicroProfile OpenApi. > Here is the MicroProfile specification url: > [https://download.eclipse.org/microprofile/microprofile-open-api-1.0.1/mi= croprofile-openapi-spec.html] > Fork / clone the=C2=A0TomEE project=C2=A0from here: > [https://github.com/apache/tomee] > Example name should be=C2=A0_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] > =C2=A0 > What you have to do is: > 1 - Create a JAX-RS endpoint with some methods (Using the same domain fro= m metrics - WeatherService would be good) > 2 -=C2=A0Annotate 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)