Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][protobuf]: any_type.proto is missing #15366

Closed
3 of 6 tasks
panyogesh opened this issue Apr 29, 2023 · 2 comments
Closed
3 of 6 tasks

[BUG][protobuf]: any_type.proto is missing #15366

panyogesh opened this issue Apr 29, 2023 · 2 comments

Comments

@panyogesh
Copy link

panyogesh commented Apr 29, 2023

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

AnyType is not defined in protobuf-schema generated code.

openapi-generator version

6.5.0

OpenAPI declaration file content or url
https://github.com/jdegre/5GC_APIs/blob/Rel-16/TS29571_CommonData.yaml
    ChangeItem:
      type: object
      properties:
        op:
          $ref: '#/components/schemas/ChangeType'
        path:
          type: string
        from:
          type: string
        origValue: {}   <<<<<<<<<<<< This value
        newValue: {}
      required:
Generation Details
  • java -jar openapi-generator-cli.jar generate -i TS29571_CommonData.yaml -g protobuf-schema -o OUT_PROTOBUF
Steps to reproduce
  • java -jar openapi-generator-cli.jar generate -i TS29571_CommonData.yaml -g protobuf-schema -o OUT_PROTOBUF

  • In Models directory

  • grep -r AnyType *
  • models/change_item.proto: AnyType origValue = 217238608;
  • models/change_item.proto: AnyType newValue = 294714291;
Related issues/PRs

#6332

Suggest a fix
cat models/any_type.proto

syntax = "proto3";

package openapitools;


message AnyType {
}
@panyogesh
Copy link
Author

panyogesh commented May 8, 2023

I feel like still I have a lot to learn....
https://protobuf.dev/reference/java/java-generated/#map-fields

import "google/protobuf/any.proto";

@JPMoresmau
Copy link
Contributor

Hello, why has this been closed? How do I get the generated code to reference google.protobuf.any instead of that missing AnyType?

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

No branches or pull requests

2 participants