kuliginstepan / dadata-client Goto Github PK
View Code? Open in Web Editor NEWDadata Suggestions API client for Spring (Java)
License: Apache License 2.0
Dadata Suggestions API client for Spring (Java)
License: Apache License 2.0
Коллега, здравствуйте :)
Текущая реализация OrganizationRequestBuilder создает запрос на все типы организаций:
private Set<OrganizationStatus> statuses = EnumSet.allOf(OrganizationStatus.class);
Как следствие, метод бесполезен:
public OrganizationRequestBuilder status(OrganizationStatus status) {
statuses.add(status);
return this;
}
Я для себя решил добавлением метода в свою кастомную реализацию билдера:
public PatchedOrganizationRequestBuilder clearStatuses() {
statuses.clear();
return this;
}
Не проверял, но вполне возможно эта же проблема может присутствовать и в других Request Builder'ах.
Привет) Спасибо за либу!
Коллега, пока тестировала процесс обнаружила, что не хватает одного статуса организации: REORGANIZING.
В классе com.kuliginstepan.dadata.client.domain.address.Address
отсутствует поле country_iso_code
При обращении к полю data в объекте Suggestion
, полученом из DadataClient, вылетает java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class com.kuliginstepan.dadata.client.domain.address.Address, при этом value и unrestrictedValue достаются нормально.В зависимостях модуля:
dependencies {
implementation 'com.github.kuliginstepan:dadata-client:3.0.0'
implementation 'io.projectreactor:reactor-core:3.4.21'
implementation 'io.projectreactor.netty:reactor-netty:1.0.21'
implementation 'io.projectreactor.netty:reactor-netty-core:1.0.21'
}
API дадаты отдает в поле капитала объект, а не Double при поиске по инн
Вот пример:
{
"suggestions": [
{
"value": "ООО "СТЕКЛОКОН"",
"unrestricted_value": "ООО "СТЕКЛОКОН"",
"data": {
"kpp": "772501001",
"capital": {
"type": "УСТАВНЫЙ КАПИТАЛ",
"value": 300010
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.