Git Product home page Git Product logo

gatsby-source-openapi-aggregate's People

Contributors

dannymidnight avatar devdigital avatar dthorpe avatar prichey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gatsby-source-openapi-aggregate's Issues

Unexpected token on develop

I am running into a different issue now with this plugin.
Whenever I try run gatsby develop this error shows up :
image

I branched this out from my existing project.
Here is the package.json :

{
  "name": "gatsby-starter-default",
  "description": "Gatsby default starter",
  "version": "1.0.0",
  "author": "Kyle Mathews <[email protected]>",
  "dependencies": {
    "aws-amplify": "^1.1.13",
    "aws-amplify-react": "^2.1.7",
    "babel-polyfill": "^6.26.0",
    "blob": "0.0.5",
    "blob-polyfill": "^3.0.20180112",
    "bootstrap": "^4.1.3",
    "classnames": "^2.2.6",
    "formdata-polyfill": "^3.0.13",
    "gatsby": "^2.0.66",
    "gatsby-image": "^2.0.15",
    "gatsby-plugin-create-client-paths": "^2.0.2",
    "gatsby-plugin-manifest": "^2.0.12",
    "gatsby-plugin-offline": "^2.0.11",
    "gatsby-plugin-react-helmet": "^3.0.0",
    "gatsby-plugin-sharp": "^2.0.16",
    "gatsby-plugin-typography": "^2.2.1",
    "gatsby-remark-autolink-headers": "^2.0.12",
    "gatsby-source-filesystem": "^2.0.4",
    "gatsby-source-openapi-aggregate": "^0.1.8",
    "gatsby-source-s3": "0.0.0",
    "gatsby-transformer-remark": "^2.1.15",
    "gatsby-transformer-sharp": "^2.1.4",
    "glamor": "^2.20.40",
    "glamorous": "^5.0.0",
    "graphql": "^0.13.2",
    "jquery": "^3.3.1",
    "lodash.groupby": "^4.6.0",
    "react": "^16.6.3",
    "react-app-polyfill": "^0.1.3",
    "react-country-region-selector": "^1.4.2",
    "react-dom": "^16.6.3",
    "react-helmet": "^5.2.0",
    "react-icons": "^3.2.2",
    "react-router-dom": "^4.3.1",
    "react-transition-group": "^2.5.0",
    "react-typography": "^0.16.13",
    "reactstrap": "^6.5.0",
    "styled-components": "^4.1.2",
    "typography": "^0.16.17",
    "validator": "^10.9.0",
    "whatwg-fetch": "^2.0.4"
  },
  "keywords": [
    "gatsby"
  ],
  "license": "MIT",
  "scripts": {
    "build": "gatsby build",
    "develop": "gatsby develop",
    "start": "npm run develop",
    "format": "prettier --write \"src/**/*.js\"",
    "test": "echo \"Error: no test specified\" && exit 1",
    "cleancache": "rimraf .cache/*"
  },
  "devDependencies": {
    "prettier": "^1.14.2"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/gatsbyjs/gatsby-starter-default"
  }
}

Incompatible with Gatsby 3 due to usage of `boundActionCreators`

See https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v2-to-v3/#removal-of-boundactioncreators.

Seems like you just need to replace boundActionCreators with actions. I tried it locally and that seems to be only change needed to get this to work :)

The sample project probably needs to be updated to at least Gatsby 2 also.

Or if you want to support gatsby 1 through 3 maybe this would work...

exports.sourceNodes = async ({ actions, boundActionCreators }, options) => {
  const { createNode } = actions || boundActionCreators;

childOpenApiSpecResponse.childrenOpenApiSpecDefinition doesn't contain all referenced definitions

The current childrenOpenApiSpecDefinition contains the primary definition only. The definition may reference other definitions (recursively?) to build up the full tree of definitions. I have this working locally for my 1-level nesting using the code:

        const definitionId = ref ? ref.replace('#/definitions/', '') : null;

        let children = definitionId ? [`${rootId}.definition.${definitionId}`] : [];

        if (definitionId) {
          const mainDefinition = definitions.filter(definition => definition.fields.name === definitionId)[0];
          const referencedDefinitions =
            mainDefinition.fields.properties.
              map(prop => prop.referencedDefinition).
              filter((p) => p).
              map(id => `${rootId}.definition.${id}`);

          children = children.concat(Array.from(new Set(referencedDefinitions)));
        }

        return {
          id: `${rootId}.path.${p}.verb.${v}.response.${r}`,
          parent: `${rootId}.path.${p}.verb.${v}`,
          children,
          fields: {
            statusCode: r,
            description: response.description
          }
        };

GraphQLError: Cannot query field "allOpenApiSpec" on type "Query"

Hi!

using the example that you provided, i get GraphQLError: Cannot query field "allOpenApiSpec" on type "Query" with gatsby-node.js. While the graphQL queries work otherwise, gatsby-node.js seems to trip on the definition when using the createPage method.

Something tells me it has to do with an older version of gastby that this example uses but i wonder if this is something you'd be able to reproduce.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.