private Locale selectLocale(Locale inputLocale) {
		List<String> allowedLocales = springDocConfigProperties.getAllowedLocales();
		if (!CollectionUtils.isEmpty(allowedLocales)) {
			Locale bestMatchingAllowedLocale = Locale.lookup(
					Locale.LanguageRange.parse(inputLocale.toLanguageTag()),
					allowedLocales.stream().map(Locale::forLanguageTag).toList()
			);

			return bestMatchingAllowedLocale == null ? Locale.forLanguageTag(allowedLocales.get(0)) : bestMatchingAllowedLocale;
		}

		return inputLocale == null ? Locale.getDefault() : inputLocale;
	}
Gets open api.

@param locale the locale
@return the open api
springdoc-openapi-starter-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java