Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add remove function for top level path description and summary #50

Merged
merged 2 commits into from
Aug 16, 2024
Merged

add remove function for top level path description and summary #50

merged 2 commits into from
Aug 16, 2024

Conversation

sebastian-otto-axa
Copy link
Contributor

@sebastian-otto-axa sebastian-otto-axa commented Aug 16, 2024

Description

The openapicmd failed to strip when the path has a top level description.
Bellow my OpenapiSpec File with a top level path desrciption and the error i get when running the following:

npx openapicmd read --strip openapi_client_axios --format json src....

Yaml OpenapiSpec

paths:
  /sidemenu:
    description: Path to load side menu entries.
    get:
      description: Returns a list of side menu entries.
      tags:
        - side-menu
      operationId: getSidemenu
      responses:
        '200':
...

Exception

TypeError: Cannot create property 'responses' on string 'Path to load side menu entries.'
    at stripDefinition (C:\Users\xxxx\AppData\Local\npm-cache\_npx\fb2ea8e0e5441457\node_modules\openapicmd\lib\common\strip-definition.js:179:62)
    at parseDefinition (C:\Users\xxxx\AppData\Local\npm-cache\_npx\fb2ea8e0e5441457\node_modules\openapicmd\lib\common\definition.js:123:59)
    at async Read.run (C:\Users\xxxx\AppData\Local\npm-cache\_npx\fb2ea8e0e5441457\node_modules\openapicmd\lib\commands\read.js:17:24)
    at async Read._run (C:\Users\xxxx\AppData\Local\npm-cache\_npx\fb2ea8e0e5441457\node_modules\@oclif\core\lib\command.js:311:22)
    at async Config.runCommand (C:\Users\xxxx\AppData\Local\npm-cache\_npx\fb2ea8e0e5441457\node_modules\@oclif\core\lib\config\config.js:433:25)
    at async run (C:\Users\xxxx\AppData\Local\npm-cache\_npx\fb2ea8e0e5441457\node_modules\@oclif\core\lib\main.js:92:16)
    at async C:\Users\xxxx\AppData\Local\npm-cache\_npx\fb2ea8e0e5441457\node_modules\openapicmd\bin\run.js:6:3

@anttiviljami anttiviljami merged commit b9cdc2d into openapistack:main Aug 16, 2024
1 check passed
@anttiviljami
Copy link
Member

Thanks @sebastian-otto-axa !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants