Skip to content

Feature/391 improve oa schema - add fields info#392

Merged
mesilov merged 15 commits intov3-devfrom
feature/391-improve-oa-schema
Mar 29, 2026
Merged

Feature/391 improve oa schema - add fields info#392
mesilov merged 15 commits intov3-devfrom
feature/391-improve-oa-schema

Conversation

@mesilov
Copy link
Copy Markdown
Collaborator

@mesilov mesilov commented Mar 18, 2026

Q A
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #391
License MIT

mesilov added 2 commits March 18, 2026 11:55
- Introduced `openapi.json` to document the Bitrix24 REST V3 API.
- Removed `openapi.json` from `.gitignore` to include it in version control.
- Defined API methods, request bodies, responses, and schema components for `main`, `rest`, and `tasks` modules.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…line and usage requirements

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
@mesilov mesilov changed the base branch from v3 to v3-dev March 18, 2026 06:09
@mesilov mesilov added this to the 3.1.0 milestone Mar 18, 2026
@mesilov mesilov added the enhancement in REST-API New feature or request in REST-API label Mar 18, 2026
@mesilov mesilov self-assigned this Mar 18, 2026
@mesilov mesilov marked this pull request as draft March 18, 2026 06:10
mesilov and others added 13 commits March 18, 2026 12:25
…n generation

- Introduced `show-sdk-coverage-statistics` to display SDK API coverage in the console.
- Added `build-documentation` to generate Markdown documentation for SDK API coverage.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…SDK metadata extraction

- Resolved crashes caused by `AttributesParser` when handling union return types like `int|string`.
- Introduced a helper to normalize `ReflectionType` into metadata, supporting `ReflectionNamedType`, `ReflectionUnionType`, and `ReflectionIntersectionType`.
- Extended API-method metadata to include `sdk_return_type_declaration` for accurate representation of compound types.
- Added regression tests for union return types and expanded test coverage for various reflection shapes.
- Verified compatibility of coverage statistics and documentation generation tools.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…od metadata

- Replaced associative array-based metadata structure with strongly typed readonly VO (`SupportedInSdkApiMethod`) featuring public fields.
- Updated consumers to handle the VO contract, ensuring consistent field access and camelCase naming convention.
- Extended type reflection logic to preserve compound return types via `sdkReturnTypeDeclaration` while maintaining compatibility for single-class return types.
- Revised `getSupportedInSdkApiMethods()` to return `list<SupportedInSdkApiMethod>` with explicit collection behavior.
- Updated and

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
… with compound return types.

- Migrated metadata to strongly typed readonly VO (`SupportedInSdkApiMethod`) to replace associative arrays, improving consistency and type safety.
- Extended type reflection to support `ReflectionUnionType`, `ReflectionIntersectionType`, and nullable types, preserving compound return types in metadata.
- Updated documentation and consumers to accommodate the new metadata structure.
- Added regression tests for various reflection scenarios.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
- Introduced `b24-dev:show-oa-sdk-coverage` command to compare OpenAPI schema snapshot (`openapi.json`) against SDK v3 methods.
- Implemented coverage calculation to classify methods as covered, uncovered, or SDK-only.
- Added support for scope compatibility validation and alias handling for OA-to-SDK mismatches.
- Included optional flags (`--show-uncovered`, `--show-sdk-only`) for detailed diagnostics.
- Updated `Makefile` to add `oa-sdk-coverage` target for the new command.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…esign steps

- Added detailed guidance on using OpenAPI Specification Extensions (`x-*`) for vendor-specific metadata, including reserved prefixes and project-local namespace recommendations (`x-b24-*`).
- Appended documentation and research notes to task #391.
- Outlined the implementation plan for SDK support of `tasks.task.field.get` and `tasks.task.field.list` in task #

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
- Implemented support for `tasks.task.field.get` and `tasks.task.field.list` methods.
- Introduced `TaskFieldItemResult`, `TaskFieldResult`, and `TaskFieldsResult` to provide strongly typed wrappers for API responses.
- Updated `TaskServiceBuilder` to include the new `TaskField` service.
- Added integration test coverage for task field metadata methods.
- Documented result-item annotation testing and conventions in `AGENTS.md` and `docs/testing.md`.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
- Introduced `b24-dev:show-v3-field-metadata` command to fetch and display field metadata for specific v3 entities.
- Implemented `Bitrix24V3FieldMetadataFetcher` for field metadata retrieval via OpenAPI methods.
- Added support for JSON and table output formats.
- Developed `DevWebhookResolver` to handle webhook resolution logic, prioritizing CLI input followed by environment variables.
- Included unit and integration tests for the new CLI command and supporting classes.

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
# Conflicts:
#	.tasks/395/plan.md
#	AGENTS.md
#	CHANGELOG.md
Signed-off-by: mesilov <mesilov.maxim@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…and GitHub tracking, enforce OpenAPI schema refresh

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
…testing class naming for clarity

Signed-off-by: mesilov <mesilov.maxim@gmail.com>
@mesilov mesilov marked this pull request as ready for review March 29, 2026 20:31
@mesilov mesilov merged commit efd3e47 into v3-dev Mar 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement in REST-API New feature or request in REST-API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature in REST-API]: add additional information to OA schema

1 participant