@@ -36,7 +36,7 @@ import {
3636 HEADER_LINKS_HOVER_COLOR as headerLinksHoverColorSetting ,
3737 HEADER_LINKS_BACKGROUND_COLOR as headerLinksBackgroundColorSetting
3838} from ' ../obp/style-setting'
39- import { obpApiActiveVersionsKey , obpGroupedMessageDocsKey , obpMyCollectionsEndpointKey } from ' @/obp/keys'
39+ import { obpApiActiveVersionsKey , obpGroupedMessageDocsKey , obpGroupedMessageDocsJsonSchemaKey , obpMyCollectionsEndpointKey } from ' @/obp/keys'
4040import SvelteDropdown from ' ./SvelteDropdown.vue'
4141
4242const route = useRoute ()
@@ -51,6 +51,14 @@ const loginUsername = ref('')
5151const logoffurl = ref (' ' )
5252const obpApiVersions = ref (inject (obpApiActiveVersionsKey ) || [])
5353const obpMessageDocs = ref (Object .keys (inject (obpGroupedMessageDocsKey ) || {}))
54+ const obpMessageDocsJsonSchema = ref (Object .keys (inject (obpGroupedMessageDocsJsonSchemaKey ) || {}))
55+
56+ // Combine message docs with JSON Schema items (with "J Schema" postfix)
57+ const combinedMessageDocs = computed (() => {
58+ const regularDocs = obpMessageDocs .value || []
59+ const jsonSchemaDocs = (obpMessageDocsJsonSchema .value || []).map (connector => ` ${connector } J Schema ` )
60+ return [... regularDocs , ... jsonSchemaDocs ]
61+ })
5462
5563// Debug menu items
5664const debugMenuItems = ref ([' /debug/providers-status' , ' /debug/oidc' ])
@@ -189,8 +197,8 @@ const setActive = (target: HTMLElement | null) => {
189197 }
190198}
191199
192- const handleMore = (command : string ) => {
193- console .log (' handleMore called with command:' , command )
200+ const handleMore = (command : string , source ? : string ) => {
201+ console .log (' handleMore called with command:' , command , ' source: ' , source )
194202
195203 // Ignore divider
196204 if (command === ' ---' ) {
@@ -201,11 +209,22 @@ const handleMore = (command: string) => {
201209 if (element !== null ) {
202210 element .textContent = command ;
203211 }
204- if (command === ' /message-docs' ) {
212+
213+ // Check if command ends with " J Schema" - if so, it's a JSON Schema message doc
214+ if (command .endsWith (' J Schema' )) {
215+ const connector = command .replace (' J Schema' , ' ' )
216+ console .log (' Navigating to message docs JSON schema:' , connector )
217+ router .push ({ name: ' message-docs-json-schema' , params: { id: connector } })
218+ } else if (command === ' /message-docs' ) {
205219 // Navigate to message docs list
206220 console .log (' Navigating to message docs list' )
207221 router .push ({ name: ' message-docs-list' })
222+ } else if (command === ' /message-docs-json-schema' ) {
223+ // Navigate to message docs JSON schema list
224+ console .log (' Navigating to message docs JSON schema list' )
225+ router .push ({ name: ' message-docs-json-schema-list' })
208226 } else if (command .includes (' _' )) {
227+ // Regular message docs (connector names contain underscores)
209228 console .log (' Navigating to message docs:' , command )
210229 router .push ({ name: ' message-docs' , params: { id: command } })
211230 } else if (command .startsWith (' /debug/' )) {
@@ -292,7 +311,7 @@ const getCurrentPath = () => {
292311 class =" menu-right"
293312 id =" header-nav-message-docs"
294313 label =" Message Docs"
295- :items =" obpMessageDocs "
314+ :items =" combinedMessageDocs "
296315 :hover-color =" headerLinksHoverColor"
297316 :background-color =" headerLinksBackgroundColor"
298317 @select =" handleMore"
0 commit comments