Comments (5)
Hi @k9withabone, I'm happy for any contributions, these should be simple to add, feel free to do it in one pull request. There tests are also failing (I discovered I wasn't parsing all the example files in our suite) which might add some more to your list.
from docker-compose-types.
I've gotten my list completed. Ended up refactoring a few things since this will be a breaking change anyway. I was wondering what your opinion is on Option<Vec<T>>
vs Vec<T>
for optional fields. Most of the code uses the former, but there is some mixing of the two, for example in Service
. Personally, I prefer Vec<T>
, but there are arguments for both. I don't mind going through the code and standardizing it either way.
Anyway, on to the tests!
from docker-compose-types.
@k9withabone I think Vec<T>
is a good solution, with the option to use serde
to just not serialize empty vec (#[serde(default, skip_serializing_if = "Vec::is_empty")]
). Some of the code in the project is very old, and would reflect a different level of understanding of the language and the crates that I used.
from docker-compose-types.
I've gotten most of the test files passing. I have a couple questions about the last few.
For tests/fixtures/extends/verbose-and-shorthand.yml
it seems like it's invalid? From what I can tell the v2 spec doesn't support a shorthand syntax for extends:
. Also, shouldn't they be under services:
?
For tests/fixtures/net-container/v2-invalid.yml
and tests/fixtures/v2-simple/links-invalid.yml
they seem like they are valid even though they are marked as invalid?
from docker-compose-types.
@k9withabone I've worked with Docker Compose for many years but I don't know the exact answers above, I would refer to the spec just like you did. I copied those fixtures from the main docker project, its possible that some of them were faulty/invalid/skipped.
from docker-compose-types.
Related Issues (16)
- docker compose version HOT 6
- Bump serde-yaml dependency to 0.9 HOT 1
- Environment too strict HOT 1
- Implement 'Clone' for ComposeFile, SingleService and Compose
- Top level Volume labels don't appear to work HOT 5
- Usage example? HOT 5
- Update indexmap to v2 HOT 1
- Support for Docker Compose Secrets? HOT 1
- Implement (behind a feature branch) the Merge Crate HOT 2
- Cannot mix long syntax and short syntax volume declaration HOT 2
- Add `userns_mode` and `cap_drop` fields to `Service` HOT 2
- Add `group_add` property to `Service`
- Implement pull_policy for Service
- 'entrypoint' could be a string as well as a list
- Add missing Service properties
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 docker-compose-types.