question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to provide values for OpenAPI schema types

See original GitHub issue

Is your feature request related to a problem? Please describe.

The OpenAPI import add-on uses a predefined hashmap for default values to use if no values are specified as example.
That presents an issue for endpoints like /accounts/{account_id}/remove where an example value might change between each testing, and the default 10 for integers is most likely wrong.

Describe the solution you’d like

An options menu like the existing Form Handler, that will also let users programmatically set OpenAPI values for each type before running ZAP.

Describe alternatives you’ve considered

Setting example values for each endpoint’s types for ZAP to use, but editing the openapi spec file before each run is a slowdown if ZAP is used as a DAST in an SDLC.

Screenshots

No response

Additional context

No response

Would you like to help fix this issue?

  • Yes

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
vx-seccommented, May 20, 2022

Works like a charm, should have RTFM. 😃 For example in case of /accounts/{account_id}/remove, you just specify account_id as a field name and give it a value in form handler. Closing.

0reactions
github-actions[bot]commented, Aug 19, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenAPI Specification - Version 3.0.3 - Swagger
The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for...
Read more >
OpenAPI Specification v3.1.0 | Introduction, Definitions, & More
The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for ......
Read more >
Is type a required field for Schema Objects? #1657 - GitHub
I am wondering how to interpret the following line of OpenAPI 3 (as of v3.0.1): type - Value MUST be a string. Multiple...
Read more >
OpenAPI Examples Need Help
The schema object is used in several places in both OAS2 and OAS3: request and response being the two most common. A schema...
Read more >
OpenAPI Specification
The schema exposes two types of fields. Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found