core/server/services/url/utils.js
function getVersionPath(options) {
    const apiVersions = config.get('api:versions');
    let requestedVersion = options.version || 'v0.1';
    let requestedVersionType = options.type || 'content';
    let versionData = apiVersions[requestedVersion];
    if (typeof versionData === 'string') {
        versionData = apiVersions[versionData];
    }
    let versionPath = versionData[requestedVersionType];
    return `/${versionPath}/`;
}
function getVersionPath(options) {
    const apiVersions = config.get('api:versions');
    let requestedVersion = options.version || 'v0.1';
    let requestedVersionType = options.type || 'content';
    let versionData = apiVersions[requestedVersion];
    if (typeof versionData === 'string') {
        versionData = apiVersions[versionData];
    }
    let versionPath = versionData[requestedVersionType];
    return `/${versionPath}/`;
}
function getVersionPath ( options ) { const apiVersions = config . get ( 'api:versions' ) ; let requestedVersion = options . version || 'v0.1' ; let requestedVersionType = options . type || 'content' ; let versionData = apiVersions [ requestedVersion ] ; if ( typeof versionData === 'string' ) { versionData = apiVersions [ versionData ] ; } let versionPath = versionData [ requestedVersionType ] ; return ` ${ versionPath } ` ; }
Returns path containing only the path for the specific version asked or deprecated by default
@param {Object} options {version} for which to get the path(stable, actice, deprecated),
{type} admin|content: defaults to {version: deprecated, type: content}
@return {string} API version path
Returns path containing only the path for the specific version asked or deprecated by default