Skip to content

Add Postman collection link to generated README #167

Description

@DenTray

Description
What needs to be done?
Add one more link to the Resources block of the generated README.md: Postman Collection.
The link must point to /auto-doc/documentation/postman, where is the application URL entered during initialization (the same value used for the existing API Documentation link).
Place the new link right after the existing API Documentation link.
The link is always added, the same way as API Documentation. Do not add a new question to the init command.
The entered app URL may end with /. The result link must have exactly one / before auto-doc (https://mysite.com//auto-doc/... is wrong).
Update the README.md fixtures used by tests so they expect the new line.

Expected Outcome
What is the expected result?
After the change:
The generated README.md has a new line in the Resources block, right after the API Documentation line:

  • API Documentation
  • Postman Collection
    The link is present in every generated README.md that has the Resources block, for any app type and any set of optional blocks.
    If the entered app URL ends with /, the link still has only one / before auto-doc.
    The rest of the generated README.md is unchanged.
    Tests pass with the updated fixtures.

Verification Scenarios
How can this be tested?
Run the init command with default answers.
The Resources block of the generated README.md contains the Postman Collection line.
The line is placed right after the API Documentation line.
The URL is /auto-doc/documentation/postman.
Run the init command for a mobile app type and with all optional resources enabled (Sentry, Figma, Telescope, Nova).
The Postman Collection line is present and the URL is the same.
Run the init command and enter an app URL with a trailing slash, for example https://mysite.com/.
The generated link is https://mysite.com/auto-doc/documentation/postman, not https://mysite.com//auto-doc/documentation/postman.
Open the generated link on a project that uses ronasit/laravel-swagger >= 3.2.7.
The route returns raw OpenAPI JSON.
The response can be imported into Postman.
Run the test suite.
All tests and updated README.md fixtures pass.
The old generated README.md content is not broken anywhere else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions