From 562b888da40537269c450998cc1acb6bb01cc629 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Mon, 13 Jan 2020 18:00:46 +1100 Subject: [PATCH] fix openapi issue --- .../main/java/org/hl7/fhir/r5/openapi/OpenApiGenerator.java | 4 ++-- .../java/org/hl7/fhir/r5/openapi/ServerVariableWriter.java | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/openapi/OpenApiGenerator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/openapi/OpenApiGenerator.java index bad6d7ce5..806f97127 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/openapi/OpenApiGenerator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/openapi/OpenApiGenerator.java @@ -426,7 +426,7 @@ public class OpenApiGenerator { } private void generateCreate(CapabilityStatementRestResourceComponent r) { - OperationWriter op = makePathRes(r).operation("put"); + OperationWriter op = makePathRes(r).operation("post"); op.summary("Create a new resource"); op.operationId("create"+r.getType()); RequestBodyWriter req = op.request(); @@ -452,7 +452,7 @@ public class OpenApiGenerator { } private void generateBatchTransaction(CapabilityStatementRestComponent csr) { - OperationWriter op = makePathSystem().operation("post"); + OperationWriter op = makePathSystem().operation("put"); op.summary("Batch or Transaction"); op.operationId("transaction"); RequestBodyWriter req = op.request(); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/openapi/ServerVariableWriter.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/openapi/ServerVariableWriter.java index f0d01c872..38fd76391 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/openapi/ServerVariableWriter.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/openapi/ServerVariableWriter.java @@ -40,7 +40,6 @@ public class ServerVariableWriter extends BaseWriter { return this; } - public ServerVariableWriter defaultValue(String value) { object.addProperty("default", value); return this;