All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openapitools.configuration.EnumConverterConfiguration Maven / Gradle / Ivy

Go to download

Generates jar artifact containing compiled openapi classes based on generated openapi yaml files

The newest version!
package org.openapitools.configuration;

import dev.crashteam.openapi.analytics.model.Marketplace;
import dev.crashteam.openapi.analytics.model.QueryPeriod;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.converter.Converter;

@Configuration
public class EnumConverterConfiguration {

    @Bean(name = "org.openapitools.configuration.EnumConverterConfiguration.marketplaceConverter")
    Converter marketplaceConverter() {
        return new Converter() {
            @Override
            public Marketplace convert(String source) {
                return Marketplace.fromValue(source);
            }
        };
    }
    @Bean(name = "org.openapitools.configuration.EnumConverterConfiguration.queryPeriodConverter")
    Converter queryPeriodConverter() {
        return new Converter() {
            @Override
            public QueryPeriod convert(String source) {
                return QueryPeriod.fromValue(source);
            }
        };
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy