knuckleswtf / knuckleswtf/scribe

Add a way to disable query parameters and headers in PostmanCollectionWriter

Open
#988 1 comment 0 reactions 0 assignees View on GitHub
question triage
Dominant language
PHP
Stars
2.3k
Forks
357
PR merge metrics
No merged PRs in 30d

Description

### Scribe version

5.1.0

### Your question

I've read the `PostmanCollectionWriter` class code and found how the query parameters are disabled in the collection. It is sensible to disable a parameter when it is not mandatory but I find odd that it needs to have no example.

I'd like to be able to show an example to the collection users without the need to add that example in the description.

I understand that this might break some configurations so it could be something similar to the following:

- a new parameter in the configuration file.
- a generator override like what it's done with the `OpenApiSpecWriter` class.

In the same way, I would like to be able to disable custom headers.

The reasoning behind this request is the following.
When you have multiple query search parameters or multiple custom headers, it takes a long time to disable everything before running the query in Postman.
I still want to see them with description and example but I want to select the one I need instead of disabling manually the one I do not need.

Let me know what you think!

### Docs

- [x] I've checked [the docs](https://scribe.knuckles.wtf/laravel), the [troubleshooting guide](https://scribe.knuckles.wtf/laravel/troubleshooting), and [existing issues](https://github.com/knuckleswtf/scribe/issues?q=is%3Aissue+), but I didn't find a solution

Contributor guide

Open the contributing guide

Research direction

Start with the PostmanCollectionWriter and compare the override approach used by OpenApiSpecWriter. Trace how query parameters are currently disabled, then determine how configuration should cover optional query parameters and custom headers while preserving their descriptions and examples. Done means the requested controls work without requiring examples in descriptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php, postman
Domain
api, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.