fix openapi issue

This commit is contained in:
Grahame Grieve 2020-01-13 18:00:46 +11:00
parent 644c07429c
commit 562b888da4
2 changed files with 2 additions and 3 deletions

View File

@ -426,7 +426,7 @@ public class OpenApiGenerator {
} }
private void generateCreate(CapabilityStatementRestResourceComponent r) { private void generateCreate(CapabilityStatementRestResourceComponent r) {
OperationWriter op = makePathRes(r).operation("put"); OperationWriter op = makePathRes(r).operation("post");
op.summary("Create a new resource"); op.summary("Create a new resource");
op.operationId("create"+r.getType()); op.operationId("create"+r.getType());
RequestBodyWriter req = op.request(); RequestBodyWriter req = op.request();
@ -452,7 +452,7 @@ public class OpenApiGenerator {
} }
private void generateBatchTransaction(CapabilityStatementRestComponent csr) { private void generateBatchTransaction(CapabilityStatementRestComponent csr) {
OperationWriter op = makePathSystem().operation("post"); OperationWriter op = makePathSystem().operation("put");
op.summary("Batch or Transaction"); op.summary("Batch or Transaction");
op.operationId("transaction"); op.operationId("transaction");
RequestBodyWriter req = op.request(); RequestBodyWriter req = op.request();

View File

@ -40,7 +40,6 @@ public class ServerVariableWriter extends BaseWriter {
return this; return this;
} }
public ServerVariableWriter defaultValue(String value) { public ServerVariableWriter defaultValue(String value) {
object.addProperty("default", value); object.addProperty("default", value);
return this; return this;