Skip to content

Commit

Permalink
Fix shamrock-openapi
Browse files Browse the repository at this point in the history
- use BeanContainer abstraction
- remove dependency on weld
  • Loading branch information
mkouba committed Aug 31, 2018
1 parent 026a17b commit a318ce1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 0 additions & 4 deletions openapi/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
<groupId>org.jboss.shamrock</groupId>
<artifactId>shamrock-core-deployment</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.shamrock</groupId>
<artifactId>shamrock-weld-deployment</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.shamrock</groupId>
<artifactId>shamrock-undertow-deployment</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package org.jboss.shamrock.openapi.runtime;

import javax.enterprise.inject.se.SeContainer;

import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.ConfigProvider;
import org.eclipse.microprofile.openapi.OASFilter;
import org.eclipse.microprofile.openapi.models.OpenAPI;
import org.jboss.shamrock.runtime.BeanContainer;
import org.jboss.shamrock.runtime.ContextObject;
import org.jboss.shamrock.runtime.Shamrock;

Expand All @@ -19,7 +18,7 @@
*/
public class OpenApiDeploymentTemplate {

public void setupModel(@ContextObject("weld.container") SeContainer container, OpenAPI staticModel, OpenAPI annotationModel) {
public void setupModel(@ContextObject("bean.container") BeanContainer container, OpenAPI staticModel, OpenAPI annotationModel) {
Config config = ConfigProvider.getConfig();
OpenApiConfig openApiConfig = new OpenApiConfigImpl(config);

Expand All @@ -32,7 +31,7 @@ public void setupModel(@ContextObject("weld.container") SeContainer container, O
document.filter(filter(openApiConfig));
document.initialize();

container.select(OpenApiDocumentProducer.class).get().setDocument(document);
container.instance(OpenApiDocumentProducer.class).setDocument(document);
}

private OpenApiDocument createDocument(OpenApiConfig openApiConfig) {
Expand Down

0 comments on commit a318ce1

Please sign in to comment.