swagger-api / swagger-api/swagger-codegen

[Dart] ByteArray removed from dart

Open
#8,546 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

ByteArray was removed from dart 2013-03-28. When using format: byte codegen translate it to ByteArray.

It gives the folowing error message and fail to build flutter:
compiler message: file:///Users/henge/dev/swacodegen/out/lib/model/device_provisioning_req.dart:11:3: Error: Type 'ByteArray' not found. compiler message: ByteArray csr = null;

Swagger-codegen version

2.4.0-SNAPSHOT

Swagger declaration file content or url
      certificate:
        type: string
        format: byte
Command line used for generation

./run-in-docker.sh generate -i swagger.yaml -l dart -o /gen/out -DbrowserClient=false

Steps to reproduce
  • Generate the code
  • flutter run
Related issues/PRs

Added mapping from Bytearray to String

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the supplied Swagger declaration and command, then inspect the generated out/lib/model/device_provisioning_req.dart where format: byte becomes ByteArray. Compare the Dart generator's output with the linked mapping change, and verify that the generated Flutter project builds without the ByteArray error.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.