Giter VIP home page Giter VIP logo

openapi-boilerplate's People

Contributors

dependabot[bot] avatar dgarcia360 avatar mikeralphson 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  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  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  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  avatar

openapi-boilerplate's Issues

Update node version in gh-pages.yml workflow file

Thank you for putting this templated repo together! I found it extremely useful when utilizing it in my own project.

Bug Summary

A recent build following the workflow file gh-pages.yml resulted in the below error:

internal/modules/cjs/loader.js:818
  throw err;
  ^

Error: Cannot find module 'react-is'
Click for full error message
Run npm ci
added 414 packages in 4.487s

> [email protected] build /home/runner/work/daeclipse/daeclipse
> swagger-cli bundle spec/openapi.yaml --outfile _build/api/openapi.yaml --type yaml

Created _build/api/openapi.yaml from spec/openapi.yaml

> [email protected] html /home/runner/work/daeclipse/daeclipse
> npm run build && redoc-cli bundle _build/api/openapi.yaml  --output _build/api/index.html --options.onlyRequiredInSamples


> [email protected] build /home/runner/work/daeclipse/daeclipse
> swagger-cli bundle spec/openapi.yaml --outfile _build/api/openapi.yaml --type yaml

Created _build/api/openapi.yaml from spec/openapi.yaml
internal/modules/cjs/loader.js:818
  throw err;
  ^

Error: Cannot find module 'react-is'
Require stack:
- /home/runner/work/daeclipse/daeclipse/node_modules/redoc-cli/node_modules/styled-components/dist/styled-components.cjs.js
- /home/runner/work/daeclipse/daeclipse/node_modules/redoc-cli/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/runner/work/daeclipse/daeclipse/node_modules/redoc-cli/node_modules/styled-components/dist/styled-components.cjs.js:1:145)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/runner/work/daeclipse/daeclipse/node_modules/redoc-cli/node_modules/styled-components/dist/styled-components.cjs.js',
    '/home/runner/work/daeclipse/daeclipse/node_modules/redoc-cli/index.js'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] html: `npm run build && redoc-cli bundle _build/api/openapi.yaml  --output _build/api/index.html --options.onlyRequiredInSamples`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] html script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2021-08-07T15_20_03_874Z-debug.log
Error: Process completed with exit code 1.

Link to build: https://github.com/Pepper-Wood/daeclipse/runs/3269822656

Proposed Solution

Thanks to this comment - nodejs/help#1846 (comment) - a working fix was to update the node version that's listed in the gh-pages.yml workflow file.

Link to my code change: kdipippo/daeclipse@5dac86f

Following the diff here should be able to future-proof if any others run into the same issue with attempting to deploy.

OpenAPI Generator Question

Hi @dgarcia360 and thank you for the repo.

I have a question regarding the openapi-generator. When I run your project through it, it does not validate.

See:

~/openapi-boilerplate/src master
โฏ openapi-generator validate -i openapi.yaml
Validating spec (openapi.yaml)
Errors:
	- attribute components.responses.$ref is not of type `object`
	- attribute components.schemas.$ref is not of type `object`
	- attribute components.schemas.Schema name $ref doesn't adhere to regular expression
	  ^[a-zA-Z0-9\.\-_]+$
	- attribute components.responses.Response key $ref doesn't adhere to regular expression
	  ^[a-zA-Z0-9\.\-_]+$
	- attribute components.parameters.Parameter name $ref doesn't adhere to regular expression
	  ^[a-zA-Z0-9\.\-_]+$

[error] Spec has 5 errors.

Thank you for your help.

Reusing the same paths defenitions for different versions of the docs

Hi!

Thanks for the boilerplate and for usefull article!
But how can I reuse the same paths defenitions for different versions of the docs with the only different schema or properties definitions?

Is there any way to use variables in $ref's of the paths defenitions? Or is it possible to use relative (internal) links within $ref descriptions of the paths defenitions that not binded with concrete shemas files?

I mean if I want to create different versions of the OpenApi documentation (for developers and public for ex.) and there are only differences in schemas elements descriptions for dev and public versions. Is it possible to change the $ref for example from "../schemas/Pet.yaml" to "#/components/schemas/Pet" in path defenition and then make two different files (/schemas/Pet-dev.yaml and /schemas/Pet-public.yaml) and two openapi-public.yaml and openapi-dev.yaml main files with different components/schemas $refs (' $ref: "./schemas/pet-open.yaml" and $ref: "./schemas/pet-dev.yaml" '). in theory it may give the possibility reuse the same paths defnitions for both dev and open docs.

Unfortunately for now $ref's with internal links, like "#/components/schemas/Pet" cause an error at the building of the final doc file. And using external links like "../schemas/Pet.yaml" in paths $refs makes hard binding paths defenition with schema defenition so it doesn't allow me to reuse path defenition for different version of the docs.
Could you give me the advice?

Unclear which license applies

There are 3 different license informations spread over the repository.

The package.json defines Apache 2.0 as the package license.
The LICENSE.md specifies MIT, as does the GitHub Repo, as does the header of the README.md
The bottom of the README.md includes a License chapter, that only lists a Copyright of the creator.

Could you please clarify and maybe homogenize the license of this repository/project?

Removing unnecessary clutter

Thank you for the template!
I deleted all _index.yaml files and removed all references to them, and the spec passes linters & builds without any problems. Is there a reason for those files & their references to exist that I'm not aware of?

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.