Extend existed rules. Add rules for openapi - #3
Conversation
|
|
||
| ## Architecture and dependencies | ||
|
|
||
| - Transport adapters handle protocol concerns only: they validate the transport |
There was a problem hiding this comment.
Тут я бы написал Transport resources - мы скорее их ресурсами везде зовем
|
|
||
| - Transport adapters handle protocol concerns only: they validate the transport | ||
| contract, delegate to a service, and translate failures into protocol errors. | ||
| - Services implement business scenarios, define the order of operations, and own |
There was a problem hiding this comment.
Вот тут на счет транзакций я бы убрал и написал отдельно про то что транзакции реализуются на минимально возможном слое, если ее можно запереть в рамках метода репозитория я бы оставлял ее там и только для более сложных разрешал выносить в сервисы с учетом только реально необходимых вызовов внутри транзакции (тк я сталскивался с засовыванием им туда всего что попало вплоть удаленных вызовов)
| `Map<String, Any>`. | ||
| - Transport models are converted before reaching repositories. Simple entities may | ||
| use generated persistence models; aggregates use local domain models. | ||
| - JSON property names are specified with Jackson annotations, and closed sets of |
There was a problem hiding this comment.
тут точно надо добавить что они именуются аннотациями только если имя не совпадает с названием переменной иначе бесявые анотации везде
| - Model conversion is performed by dedicated `@Component` classes implementing | ||
| Spring's `Converter<S, T>`. | ||
| - Requests and responses are created by converters. |
There was a problem hiding this comment.
как будто 2 раза один и тот же смысл, первого достаточно либо туда добавить в том числе и Requests and responses
| - Optional fields are set only when present. An omitted value and an explicitly | ||
| empty value remain distinct when the API contract distinguishes them. | ||
| - Unsupported conversion directions fail explicitly instead of returning `null`. | ||
| - Concrete converters are provided through constructor injection. |
There was a problem hiding this comment.
наверное достаточно одного общего правила оно кажется было выше, что все спринг объекты так добавляются
| - Storage invariants use database defaults and `NOT NULL` constraints and are also | ||
| represented consistently in converters and repositories. | ||
| - Flyway and ShedLock tables are excluded from jOOQ code generation. | ||
| - No foreign keys are used. |
There was a problem hiding this comment.
вот это тоже у нас не строго на самом деле иногда использовали, я бы наверно убрал из общих и в рамках каждого сервиса отдельно принимал решения
| - A schema change is traced through migration, generated model, input conversion, | ||
| write query, read model, output conversion, and tests. |
There was a problem hiding this comment.
вот этот пункт поясни, не смог понять что это значит
|
|
||
| ## Configuration and clients | ||
|
|
||
| - Application settings use typed `@ConfigurationProperties` with `@Validated` and |
| - Missing continuation state creates a new context; malformed state fails explicitly. | ||
| - Serialized context changes are backward compatible with states produced by the | ||
| previous deployed version and are covered by compatibility tests. | ||
| - Polling metadata, including the deadline and next interval, is stored with the | ||
| operation state. |
There was a problem hiding this comment.
вот тут как бы не было косяков тк там есть пара мест для хрнения контекста которые в рамках некоторых сценариев отличают (где то пропадает котекст и надо пихать глубже)
| callback replay. | ||
| - Tests assert outbound method, path, headers, and body as well as the mapped result. | ||
| - Shared flow fixtures and builders contain transport mechanics; test cases describe | ||
| scenario-specific mocks, actions, and assertions. |
There was a problem hiding this comment.
я бы тут еще добавил про то что необходимо операться на шаблоны и стараться минимизировать изменения и максимально переиспользовать уже реализованное
No description provided.