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

Route Subgroups Don't Work With Scalar Theme #927

Open
1 task done
ghassanbounni opened this issue Dec 9, 2024 · 1 comment
Open
1 task done

Route Subgroups Don't Work With Scalar Theme #927

ghassanbounni opened this issue Dec 9, 2024 · 1 comment
Labels
bug Something isn't working triage

Comments

@ghassanbounni
Copy link

Scribe version

4.38.0

PHP version

8.3.14

Framework

Laravel

Framework version

11.34.2

Scribe config

title => "teelaunch api docs v1"
type => "external_laravel"
theme => "scalar"
laravel.docs_url => "/docs/v1"
auth.enabled => true
auth.default => true
auth.name => "apiKey"
logo => "http://teelaunch-api.test/apple-touch-icon.png"

What happened?

I'm trying to sort routes in groups/sub-groups. Groups work fine, all routes for the OrderController are sorted in the Order group but sub grouping isn't working with Scalar theme. I have switched to laravel instead of laravel_external to make sure that it is a theme issue and it is, with the normal laravel scribe theme sub groups are working.

Here is an example setup for my controllers:

/**
* @group  Orders
*
* API For Managing Orders
*/
class OrderController extends Controller


/**
* Create Order
*
* This endpoint creates a new order with the given details and items.
* 
* @subgroup POST
*
* @responseFile 201 responses/orders/store.json
* @response     400 {"success": false, "error": "..."}
* @response     422 {"success": false, "errors": []}
* @response     500 {"success": false, "error": "..."}
*/
public function store(Request $request)

Docs

@ghassanbounni ghassanbounni added bug Something isn't working triage labels Dec 9, 2024
@ghassanbounni
Copy link
Author

I have found this reference in the scalar docs on how to implement sub grouping, they modify on the openapi.yaml and add an x-tagGroups key which is not generated by scribe currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant