- {Object.keys(paths).map(path => (
- {path}
- ))}
+ {Object.keys(pageContext.json.paths).map(
+ path => (
+
+
{path}
+ {path.get && GET
}
+
+ )
+ )}
@@ -73,30 +79,11 @@ export default class ApiSwaggerTemplate extends Component {
}
export const pageQuery = graphql`
- query ApiQuery($id: String!) {
- openApiSpec(id: { eq: $id }) {
- version
- title
- description
- childrenOpenApiSpecPath {
- name
- verb
- summary
- description
- parameters {
- name
- in
- description
- required
- type
- }
- tag
- childrenOpenApiSpecResponse {
- id
- statusCode
- description
- }
- }
+ query($slug: String!) {
+ markdownRemark(fields: { slug: { eq: $slug } }) {
+ id
+ tableOfContents
+ html
}
allSectionsYaml {
diff --git a/src/templates/ApiSwagger.module.scss b/src/templates/ApiSwagger.module.scss
new file mode 100644
index 00000000..e69de29b