fix duplicate scalar "date"

This commit is contained in:
Lukas Schmierer 2021-10-04 13:21:29 +02:00
parent d67f7c9926
commit 98a99ec630
2 changed files with 11 additions and 3 deletions

View File

@ -415,11 +415,15 @@ public class GraphQLSchemaGenerator {
private void generateSearchParamType(BufferedWriter writer, String name) throws IOException, FHIRException { private void generateSearchParamType(BufferedWriter writer, String name) throws IOException, FHIRException {
String gqlName = getGqlname(name); String gqlName = getGqlname(name);
if (gqlName.equals(name)) { if (gqlName.equals("date")) {
writer.write("# Search Param ");
writer.write(name);
writer.write(": already defined as Primitive with JSON Format: string ");
} else if (gqlName.equals(name)) {
writer.write("scalar "); writer.write("scalar ");
writer.write(name); writer.write(name);
writer.write(" # JSON Format: string"); writer.write(" # JSON Format: string");
} else { } else {
writer.write("# Search Param "); writer.write("# Search Param ");
writer.write(name); writer.write(name);
writer.write(": use GraphQL Scalar type "); writer.write(": use GraphQL Scalar type ");

View File

@ -418,7 +418,11 @@ public class GraphQLSchemaGenerator {
private void generateSearchParamType(BufferedWriter writer, String name) throws IOException, FHIRException { private void generateSearchParamType(BufferedWriter writer, String name) throws IOException, FHIRException {
String gqlName = getGqlname(name); String gqlName = getGqlname(name);
if (gqlName.equals(name)) { if (gqlName.equals("date")) {
writer.write("# Search Param ");
writer.write(name);
writer.write(": already defined as Primitive with JSON Format: string ");
} else if (gqlName.equals(name)) {
writer.write("scalar "); writer.write("scalar ");
writer.write(name); writer.write(name);
writer.write(" # JSON Format: string"); writer.write(" # JSON Format: string");