store artifacts for v3.2
This commit is contained in:
parent
67a5b59d00
commit
b108c66d97
@ -32,6 +32,9 @@ public abstract class AbstractProcess {
|
||||
|
||||
private static Logger log = LogManager.getLogger(AbstractProcess.class);
|
||||
|
||||
protected static final String PARAM_SOURCE_APIM = "source_apim";
|
||||
protected static final String VERSION_32 = "v32";
|
||||
|
||||
protected Gson gson;
|
||||
|
||||
protected Yaml yaml;
|
||||
|
||||
@ -15,7 +15,6 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
@ -161,6 +160,7 @@ public class ImportToApicurio extends AbstractProcess {
|
||||
Map<String, String> props = new LinkedHashMap<>();
|
||||
props.put("version", api.getVersion());
|
||||
props.put("status", status);
|
||||
props.put(PARAM_SOURCE_APIM, VERSION_32);
|
||||
addSubscriptionsToProps(props, subsMap);
|
||||
addEndpointsToProps(props, apiMap);
|
||||
addTagsToProps(props, tagsList);
|
||||
@ -325,7 +325,11 @@ public class ImportToApicurio extends AbstractProcess {
|
||||
|
||||
// Create the artifact (versioned)
|
||||
try (ByteArrayInputStream is = new ByteArrayInputStream(entry.getContent())) {
|
||||
client.createArtifactWithVersion(entry.getType().toString(), artifactId, api.getVersion(), is);
|
||||
ArtifactMetaData meta = client.createArtifactWithVersion(entry.getType().toString(), artifactId,
|
||||
api.getVersion(), is);
|
||||
Map<String, String> props = new LinkedHashMap<>();
|
||||
props.put(PARAM_SOURCE_APIM, VERSION_32);
|
||||
setMetaAndRules(meta, props, Collections.emptyList());
|
||||
}
|
||||
|
||||
ArtifactReference ref = new ArtifactReference();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user