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

TOMEE-4344 - MP6: OpenAPI 3.1 #1177

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion boms/tomee-microprofile-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
<dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
<artifactId>microprofile-openapi-api</artifactId>
<version>3.0</version>
<version>3.1.1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand Down
8 changes: 4 additions & 4 deletions boms/tomee-microprofile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
<version>3.0.1</version>
<version>3.1.6</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand Down Expand Up @@ -510,7 +510,7 @@
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-open-api-core</artifactId>
<version>3.0.1</version>
<version>3.10.0</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand All @@ -521,7 +521,7 @@
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-open-api-jaxrs</artifactId>
<version>3.0.1</version>
<version>3.10.0</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand Down Expand Up @@ -2028,7 +2028,7 @@
<dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
<artifactId>microprofile-openapi-api</artifactId>
<version>3.0</version>
<version>3.1.1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion boms/tomee-plume-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
<dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
<artifactId>microprofile-openapi-api</artifactId>
<version>3.0</version>
<version>3.1.1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand Down
8 changes: 4 additions & 4 deletions boms/tomee-plume/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
<version>3.0.1</version>
<version>3.1.6</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand Down Expand Up @@ -510,7 +510,7 @@
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-open-api-core</artifactId>
<version>3.0.1</version>
<version>3.10.0</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand All @@ -521,7 +521,7 @@
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-open-api-jaxrs</artifactId>
<version>3.0.1</version>
<version>3.10.0</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand Down Expand Up @@ -2127,7 +2127,7 @@
<dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
<artifactId>microprofile-openapi-api</artifactId>
<version>3.0</version>
<version>3.1.1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion boms/tomee-plus-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
<dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
<artifactId>microprofile-openapi-api</artifactId>
<version>3.0</version>
<version>3.1.1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand Down
8 changes: 4 additions & 4 deletions boms/tomee-plus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
<version>3.0.1</version>
<version>3.1.6</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand Down Expand Up @@ -510,7 +510,7 @@
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-open-api-core</artifactId>
<version>3.0.1</version>
<version>3.10.0</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand All @@ -521,7 +521,7 @@
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-open-api-jaxrs</artifactId>
<version>3.0.1</version>
<version>3.10.0</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand Down Expand Up @@ -2149,7 +2149,7 @@
<dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
<artifactId>microprofile-openapi-api</artifactId>
<version>3.0</version>
<version>3.1.1</version>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
<version.microprofile.health>4.0.1</version.microprofile.health>
<version.microprofile.jwt>2.1</version.microprofile.jwt>
<version.microprofile.metrics>5.0.2</version.microprofile.metrics>
<version.microprofile.openapi>3.0</version.microprofile.openapi>
<version.microprofile.openapi>3.1.1</version.microprofile.openapi>
<version.microprofile.opentracing>3.0</version.microprofile.opentracing>
<version.microprofile.rest-client>3.0.1</version.microprofile.rest-client>

Expand All @@ -196,7 +196,7 @@
<version.microprofile.impl.fault-tolerance>6.2.2</version.microprofile.impl.fault-tolerance>
<version.microprofile.impl.health>4.0.1</version.microprofile.impl.health>
<version.microprofile.impl.metrics>5.0.1</version.microprofile.impl.metrics>
<version.microprofile.impl.openapi>3.0.1</version.microprofile.impl.openapi>
<version.microprofile.impl.openapi>3.10.0</version.microprofile.impl.openapi>
<version.microprofile.impl.opentracing>3.0.3</version.microprofile.impl.opentracing>

<!-- Jackson and snakeyaml required by OpenAPI Impl -->
Expand Down
1 change: 0 additions & 1 deletion tck/microprofile-tck/openapi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<!-- 7.4.0 is broken, so until 7.5.0 is released ... -->
<version>7.5.1</version>
<scope>test</scope>
</dependency>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@
*/
package org.apache.tomee.microprofile.tck.openapi;

import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
import org.jboss.arquillian.container.test.spi.client.protocol.Protocol;
import org.jboss.arquillian.core.spi.LoadableExtension;
import org.jboss.arquillian.protocol.servlet5.v_5.ServletProtocol;

public class MicroProfileOpenAPITCKExtension implements LoadableExtension {
@Override
public void register(final ExtensionBuilder extensionBuilder) {
extensionBuilder
.override(Protocol.class, ServletProtocol.class, MicroProfileOpenAPITCKProtocol.class)
.observer(MicroProfileOpenAPITCKObserver.class)
.observer(MicroprofileOpenAPITCKDeploymentProcessor.class)
;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@

public class MicroProfileOpenAPITCKObserver {
public void AfterDeploy(@Observes final AfterDeploy afterDeploy) {
RestAssured.basePath = "microprofile-openapi";
RestAssured.basePath = afterDeploy.getDeployment().getArchive().getName().replace(".war","");
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tomee.microprofile.tck.openapi;

import java.util.Map;

import org.apache.ziplock.JarLocation;
import org.hamcrest.Matchers;
import org.jboss.arquillian.container.spi.client.deployment.DeploymentDescription;
import org.jboss.arquillian.container.spi.event.container.BeforeDeploy;
import org.jboss.arquillian.core.api.annotation.Observes;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.WebArchive;

public class MicroprofileOpenAPITCKDeploymentProcessor {

public void observeDeployment(@Observes final BeforeDeploy beforeDeploy) {
DeploymentDescription deployment = beforeDeploy.getDeployment();
Archive<?> testableArchive = deployment.getTestableArchive();
if (testableArchive != null) {
process(testableArchive);
} else {
process(deployment.getArchive());
}
}

private void process(Archive<?> archive) {
if (archive instanceof WebArchive webapp) {
webapp.addAsLibrary(JarLocation.jarLocation(Matchers.class)) // required for ModelConstructionTest
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<property name="appWorkingDir">target/workdir</property>
<property name="cleanOnStartUp">true</property>
<property name="properties">
geronimo.openapi.application.append-context-path = false
</property>
</configuration>
</container>
Expand All @@ -49,7 +48,6 @@
<property name="cleanOnStartUp">true</property>
<property name="properties">
tomee.mp.scan = all
geronimo.openapi.application.append-context-path = false
</property>
</configuration>
</container>
Expand All @@ -65,7 +63,6 @@
<property name="cleanOnStartUp">true</property>
<property name="properties">
tomee.mp.scan = all
geronimo.openapi.application.append-context-path = false
</property>
</configuration>
</container>
Expand Down
Loading