From commits-return-46023-archive-asf-public=cust-asf.ponee.io@tomee.apache.org Wed Jan 2 13:49:11 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 5A2C1180662 for ; Wed, 2 Jan 2019 13:49:11 +0100 (CET) Received: (qmail 43911 invoked by uid 500); 2 Jan 2019 12:49:10 -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 43902 invoked by uid 500); 2 Jan 2019 12:49:10 -0000 Delivered-To: apmail-openejb-commits@openejb.apache.org Received: (qmail 43899 invoked by uid 99); 2 Jan 2019 12:49:10 -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:49:10 +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 E525A180E17 for ; Wed, 2 Jan 2019 12:49:09 +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 U6mTGppx7hvc for ; Wed, 2 Jan 2019 12:49:08 +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 6CBB761128 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 69198E261D 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 B9558253C8 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= 2016#comment-16732016 ]=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_r244725387 =20 --- Diff: examples/mp-openapi/src/main/java/org/superbiz/openapi/Weathe= rService.java --- @@ -0,0 +1,52 @@ +package org.superbiz.openapi; + + + +import javax.enterprise.context.ApplicationScoped; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.core.Response; + +import org.eclipse.microprofile.openapi.annotations.Operation; +import org.eclipse.microprofile.openapi.annotations.parameters.Paramet= er; +import org.eclipse.microprofile.openapi.annotations.responses.APIRespo= nse; +import org.eclipse.microprofile.openapi.annotations.media.Content; +import org.eclipse.microprofile.openapi.annotations.media.Schema; + --- End diff -- =20 Can you be careful formatting the class? There are a lot of unnecessary= spaces. > 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)