Skip to content

fix: ODCS to .proto, problem with array of objects#1012

Open
Schokuroff wants to merge 8 commits intodatacontract:mainfrom
Schokuroff:fix/proto-exporter
Open

fix: ODCS to .proto, problem with array of objects#1012
Schokuroff wants to merge 8 commits intodatacontract:mainfrom
Schokuroff:fix/proto-exporter

Conversation

@Schokuroff
Copy link

@Schokuroff Schokuroff commented Jan 12, 2026

  • Tests pass
  • ruff format
  • README.md updated (if relevant)
  •  CHANGELOG.md entry added

@Schokuroff
Copy link
Author

schema:
- name: FsaRegister
  logicalType: object
  properties:
  - name: fsa_room
    logicalType: array
    items:
      name: FsaRoom
      logicalType: object
      properties:
      - name: rooms_count
        logicalType: integer
      - name: category_type
        logicalType: string
  - name: simple_array_int
    logicalType: array
    items:
      logicalType: integer
  - name: simple_int
    logicalType: integer
  - name: simple_obj
    logicalType: object
    properties:
    - name: rooms_count
      logicalType: integer
    - name: category_type
      logicalType: string

to

syntax = "proto3";

package example;

message FsaRegister {
message FsaRoom {
    int32 rooms_count = 1;
    string category_type = 2;
  }

message SimpleObj {
    int32 rooms_count = 1;
    string category_type = 2;
  }

  repeated FsaRoom fsa_room = 1;
  repeated int32 simple_array_int = 2;
  int32 simple_int = 3;
  SimpleObj simple_obj = 4;
}

@Schokuroff
Copy link
Author

Sorry, I think I forgot to do the ruff and tests, I'll add them now.

@Schokuroff Schokuroff changed the title fix export array of objects fix: ODCS to .proto, problem with array of objects Jan 12, 2026
@Schokuroff
Copy link
Author

@jochenchrist
wow, looks like all checks have passed, can we merge it?

@Schokuroff
Copy link
Author

I have done ruff check localy, but failed with "uv run pytest", oracle idk...

uv run pytest
========================================================= test session starts =========================================================
platform darwin -- Python 3.11.8, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/nshokurov/Documents/datacontract/datacontract-cli
configfile: pyproject.toml
plugins: anyio-4.12.1, xdist-3.8.0, typeguard-4.4.4
collected 261 items / 5 errors

=============================================================== ERRORS ================================================================
_____________________________________________ ERROR collecting tests/test_test_oracle.py ______________________________________________
.venv/lib/python3.11/site-packages/urllib3/connectionpool.py:787: in urlopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants