Comments (1)
This is already supported. OpenAPIArt uses x-include to specifically inline code as opposed to $ref which expects global objects
.
Declare the global enum as follows:
Files.FileLocation:
type: string
enum:
- deleted
- location1
- location2
Inline the enum where needed in the model using the x-include extension.
Object1:
type: object
properties:
global_enum_1:
x-include:
- '#/components/schemas/Files.FileLocation'
Object2:
type: object
properties:
global_enum_2:
x-include:
- '#/components/schemas/Files.FileLocation'
SDK code will be generated on a per attribute basis.
from openapiart.
Related Issues (20)
- Add a command in do.py do install deps, generate code, lint code and run tests all at once (for pre-commit step)
- Go/Python CI should use openapiart python package instead of source code to generate SDK HOT 2
- Add CI for testing dev env HOT 1
- Generated python SDK does not hold all intended requirements in requirements.txt HOT 1
- Generated Go SDK does not hold correct versions of packages in go.mod
- Segregate tests for python SDK from openapiart unit tests
- Default proto package name should not be sanity and artifact dir should not be art
- gRPC transport currently does not allow exchanging messages above 4MB
- No validation for required properties with default value HOT 1
- Generation of SDK should not be needed for generating the proto file
- Need to generate proper error message upon API call between client and server with incompatible API version HOT 1
- go generated SDK should have proper nomenclature
- Alignment across different openapiart consumers for v0.3.x
- Required properties cannot be set with 'None'.
- schema which has required choices are throwing required validation error at time of initialization
- array properties using same schema does not work in go SDK
- Validation throws an error stating invalid type str when an out-of-range int (64 in this case) is passed in ("property port_number shall be of type <class 'int'> at <class 'port_model.Port'> \n got bad of type <class 'str'> , expected min 1, expected max 32"). Error message must not mention type if type is not an issue
- Any 2xx response should satisfy the response requirements for openapi requests
- Resolve references to #/components/parameters/<parameter name>
- Allow defining multiple response codes with empty content in the openapi spec
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 openapiart.