Closed ashercoren closed 1 month ago
Someone is attempting to deploy a commit to the Enzo Notario's projects Team on Vercel.
A member of the Team first needs to authorize it.
The changes in this pull request introduce new properties to the OAHeading
, OAOperation
, and OASpec
components. Specifically, headerId
is added to OAHeading
, while operationIdAsHeaderId
is introduced in both OAOperation
and OASpec
. These properties modify how IDs are computed and passed between components, allowing for more dynamic header management. The overall structure and functionality of the components remain intact, with enhancements made to accommodate the new properties.
File Path | Change Summary |
---|---|
src/components/Common/OAHeading.vue | Added headerId property of type String with a default value of null . Modified computed id to utilize headerId . |
src/components/Common/OAOperation.vue | Added operationIdAsHeaderId property of type Boolean with a default value of false . Updated computed headerId to conditionally return operationId . Updated OAHeading binding to use the new headerId . |
src/components/Common/OASpec.vue | Added operationIdAsHeaderId property of type Boolean with a default value of false . Modified rendering logic to pass this prop to OAOperation . |
sequenceDiagram
participant OASpec
participant OAOperation
participant OAHeading
OASpec->>OAOperation: Pass operationIdAsHeaderId
OAOperation->>OAHeading: Set headerId based on operationIdAsHeaderId
OAHeading->>OAHeading: Compute id using headerId or fallback
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Hi @ashercoren , why did you closed this? I'd be happy to support this if needed.
I just don't understand if you refer to the Left Sidebar, or Right Sidebar (for example in https://vitepress-openapi.vercel.app/example/one-page.html#getalldata-get-all-planets).
If you refer to Right Sidebar, I think it's working fine (as shown in the example).
Hi @ashercoren , I think you were trying to fix #76 ? I experimented this issue while working with internal URLs. It was calculating the wrong id
. Now it should works fine. In a future, we can even support multiple "id calculations" (
operationId,
tag/path`, etc).
Useful for single page with sidebar
Description
When using the OASpec component to render all operations in a single page layout, and also using useSidebar to automatically generate sidebar items, the sidebar links are not aligned with the OASpec headers. This PR adds a prop to OASpec to support using the operation id as the header id
Types of changes