import mapValues from 'lodash/mapValues.js';
const migrate = async (_, projectSchema) => {
    const result = {
        ...projectSchema,
        schemaVersion: '3.36.0'
    };
    result.services &&= mapValues(result.services, (config) => {
        // Add transformVersion to OpenAPI services so we can preserve the legacy behavior
        if (config.serviceType === 'openapi') {
            return {
                ...config,
                options: {
                    ...config.options,
                    transformVersion: '1.0.0'
                }
            };
        }
        return config;
    });
    return result;
};
export default migrate;
