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

[kie-issues#843] Generate reproducible dmndefinitions.json. #5676

Merged
Merged
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@
*/
package org.kie.dmn.openapi.impl;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.stream.Collectors;

import com.fasterxml.jackson.databind.node.ObjectNode;
import io.smallrye.openapi.runtime.io.JsonUtil;
import io.smallrye.openapi.runtime.io.schema.SchemaWriter;
Expand All @@ -44,14 +34,25 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeMap;
import java.util.stream.Collectors;

public class DMNOASGeneratorImpl implements DMNOASGenerator {
private static final Logger LOG = LoggerFactory.getLogger(DMNOASGeneratorImpl.class);
private final List<DMNModel> dmnModels;
private final List<DMNModelIOSets> ioSets = new ArrayList<>();
private final Set<DMNType> typesIndex = new HashSet<>();
private final String refPrefix;
private NamingPolicy namingPolicy;
private final Map<DMNType, Schema> schemas = new HashMap<>();
private final Map<DMNType, Schema> schemas = new TreeMap<>(Comparator.comparing(DMNType::getName));
private ObjectNode jsonSchema;

public DMNOASGeneratorImpl(Collection<DMNModel> models, String refPrefix) {
Expand Down Expand Up @@ -191,5 +192,4 @@ private void visitForIndexing(DMNType idnType) {
}
}
}

}
Loading