From 184945ab1e1dc0edf07f2361391eee6166b63e49 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Mon, 1 Aug 2022 15:27:36 +0200 Subject: [PATCH] Fix graphql imports in reference docs generation See gh-31809 --- .../spring-boot-docs/build.gradle | 3 ++ .../src/docs/asciidoc/attributes.adoc | 1 + .../main/resources/graphql/schema.graphqls | 29 +++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 spring-boot-project/spring-boot-docs/src/main/resources/graphql/schema.graphqls diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index 5c9417a646..1813d4ad55 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -321,6 +321,9 @@ syncDocumentationSourceForAsciidoctor { from("src/main/groovy") { into "main/groovy" } + from("src/main/resources") { + into "main/resources" + } } syncDocumentationSourceForAsciidoctorMultipage { diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/attributes.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/attributes.adoc index 5841bd4f26..9e60a72d9b 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/attributes.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/attributes.adoc @@ -21,6 +21,7 @@ :docs-java: {docdir}/../main/java/org/springframework/boot/docs :docs-kotlin: {docdir}/../main/kotlin/org/springframework/boot/docs :docs-groovy: {docdir}/../main/groovy/org/springframework/boot/docs +:docs-resources: {docdir}/../main/resources :spring-boot-code: https://github.com/{github-repo}/tree/{github-tag} :spring-boot-api: https://docs.spring.io/spring-boot/docs/{spring-boot-version}/api :spring-boot-docs: https://docs.spring.io/spring-boot/docs/{spring-boot-version}/reference diff --git a/spring-boot-project/spring-boot-docs/src/main/resources/graphql/schema.graphqls b/spring-boot-project/spring-boot-docs/src/main/resources/graphql/schema.graphqls new file mode 100644 index 0000000000..fcbf6b0030 --- /dev/null +++ b/spring-boot-project/spring-boot-docs/src/main/resources/graphql/schema.graphqls @@ -0,0 +1,29 @@ +type Query { + greeting(name: String! = "Spring"): String! + project(slug: ID!): Project +} + +""" A Project in the Spring portfolio """ +type Project { + """ Unique string id used in URLs """ + slug: ID! + """ Project name """ + name: String! + """ URL of the git repository """ + repositoryUrl: String! + """ Current support status """ + status: ProjectStatus! +} + +enum ProjectStatus { + """ Actively supported by the Spring team """ + ACTIVE + """ Supported by the community """ + COMMUNITY + """ Prototype, not officially supported yet """ + INCUBATING + """ Project being retired, in maintenance mode """ + ATTIC + """ End-Of-Lifed """ + EOL +} \ No newline at end of file