src/store/modules/schemas.js
/**
   * Fetch the version of a schema in a subject.
   * @param  {String} object.subject Subject name
   * @param  {Number} object.version Schema version number
   */
Fetch the version of a schema in a subject.
@param  {String} object.subject Subject name
@param  {Number} object.version Schema version number
Fetch the version of a schema in a subject . @param { String } object . subject Subject name @param { Number } object . version Schema version number
async fetchSchemaByVersion ({commit}, {subject, version}) {
    const {data: info} = await clusters.request(CLUSTER_SCHEMA_REGISTRY, {
      accept: SCHEMA_CONTENT_JSON
    }).get(`/subjects/${subject}/versions/${version}`)
    info.schema = JSON.parse(info.schema)
    commit('setSchema', {
      info,
      subject,
      version
    })
  }
async fetchSchemaByVersion ( { commit } , { subject , version } ) { const { data : info } = await clusters . request ( CLUSTER_SCHEMA_REGISTRY , { accept : SCHEMA_CONTENT_JSON } ) . get ( ` ${ subject } ${ version } ` ) info . schema = JSON . parse ( info . schema ) commit ( 'setSchema' , { info , subject , version } ) }
Fetch the version of a schema in a subject.
Fetch the version of a schema in a subject .