Comments (6)
So if we're defining the message type for field like this:
properties:
Foo:
properties:
....
We probably need to declare something like:
message Outer {
message FooProperty { ... }
FooProperty Foo = 1;
}
from openapi2proto.
Actually in protobuf terms that should probably be -Message?
Or maybe prefix all the parent messages?
message Foo {
message FooBar {
message FooBarBaz {}
}
}
from openapi2proto.
Meh, prefixing was a bad idea. -Message
seems to do the job
from openapi2proto.
Hey @lestrrat, sorry been a busy morning.
In the current version (I believe) we prepend the parent message type to the child type to ensure unique nested message types. What scenario did you run into where this did not work?
from openapi2proto.
@jprobinson no, as I looked in the code ,the only prepended types were enums. Message types did not have anything like that. :/
from openapi2proto.
I guess that bit got lost somewhere along the way (or I'm just being forgetful, v possible 😅).
Based on your explanations in the other thread, I'm cool with the -Message
suffix.
from openapi2proto.
Related Issues (20)
- Optionally allow builtin scalars to be generated with their wrapper types HOT 7
- Support for HTTP PATCH operation HOT 1
- Swagger/OpenAPI 2.0 issue on additional properties HOT 5
- GRPC Package Name HOT 2
- The NYTimes GitHub org will be renamed to nytimes HOT 1
- Generating Empty Request + Response HOT 2
- Enums of any value type (specifically booleans) should be accepted HOT 2
- Issue processing additional properties HOT 2
- Do not sort protobuf fields HOT 1
- External references are being inlined
- `responses` not translated to proto HOT 2
- Support for non-200/201 status HOT 2
- Maximum and Minimum are omitted if set to zero
- Array $ref is ignored and instead uses a not-repeated type
- add-autogenerated-comment causes an error
- Failed to transpile Kubernetes swagger.json: "'$ref' key contains non-string element (map[string]interface {})" HOT 1
- Invalid protobuf files in fixtures/ HOT 3
- did openapi2proto handle openapiv3 requestBody keyword? generated go file lost all body parameters. HOT 1
- Support ability to add field options to generated protobuf
- Is this project still maintained? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openapi2proto.