Code Monkey home page Code Monkey logo

Comments (13)

AnthorNet avatar AnthorNet commented on July 26, 2024

See: https://github.com/jamesremuscat/EDDN/blob/master/schemas/shipyard-v1.0-draft.json

from eddn.

Marginal avatar Marginal commented on July 26, 2024

Some comments:

I suggest removing the "minItems" restriction on ships , so that "ships": [] can indicate the absence of a shipyard.

Since only the name is mandatory all subscribers will need to handle it. This makes the fdId field redundant. Which field takes priority if the name and fdId conflict?
If you keep the fdId field I would suggest making it an "integer" for consistency with the commodity schema.

Do you intend to publish a list of names?
i.e. should that be "Cobra Mk III", "Cobra Mk. III" or "Cobra Mk.III" and "Type9", "Type-9" or "Type-9 Heavy" etc?

from eddn.

AnthorNet avatar AnthorNet commented on July 26, 2024

Well since the fdID is only proposed by a few softwares and you don't know how long it will last,
I tends not to rely on it too much. I think it should be to the subscribers to take care of that.
But it is thinking about future, as no one except those API software will use it for now ^^

fdID isn't an integer because on JSON, it can be unsigned and 0. By making it a number you can assure that it will not. See: http://spacetelescope.github.io/understanding-json-schema/reference/numeric.html

Agreed on removing the "minItems" on ships.

As for the list, we can add an enum field, but it would need us to be quick on updates when new ships are released.

I'll update in consequence.

from eddn.

Marginal avatar Marginal commented on July 26, 2024

I'm not necessarily suggesting that "name" be an enum - as you point out this would break when a new ship is introduced. I suggest maintaining a master list of expected ship names/spellings, but outside of the schema.

from eddn.

AnthorNet avatar AnthorNet commented on July 26, 2024

Or we can make the definition in the schema but let the field be a string

from eddn.

Marginal avatar Marginal commented on July 26, 2024

Some further comments on your updated version:

You're missing "Federal Dropship", "Imperial Courier" and "Imperial Clipper".
That should probably be "Sidewinder", not "SideWinder".

The last item (currently "Diamondback Explorer") in the enum should not be followed by a comma - it stops the schema passing jsonschemalint.

FYI here is a sample message in accordance with this schema.

I agree that it would be better for "name" to be a string.

from eddn.

AnthorNet avatar AnthorNet commented on July 26, 2024

Yep it was a quick update based on your gist
I have them like ingame in my database.
perhaps will move them on wiki.

from eddn.

Marginal avatar Marginal commented on July 26, 2024

I've updated that gist with the IDs of all of the currently flyable ships.

from eddn.

Marginal avatar Marginal commented on July 26, 2024

Looks OK to me.
I still think fdId is redundant and that it's not clear what subscribers are supposed to do with it, so I won't generate it.

from eddn.

AnthorNet avatar AnthorNet commented on July 26, 2024

@Marginal If it was for me, I woudn't have it either, some it's removed.
I think the proposal is good.

I leave for the week, but as soon as I return, I'll give it a shot in EDCE and ET-TD.

@maddavo What do you think of it ?
Does it suits your needs, your one of I think of when it comes to shipyard info ?

from eddn.

Marginal avatar Marginal commented on July 26, 2024

This schema could be simplified with no loss of information - please see my pull request #23.
Here is a sample message in the simplified schema that I'm suggesting in #23.

from eddn.

Marginal avatar Marginal commented on July 26, 2024

Thanks. This draft schema is implemented in EDCD/EDMarketConnector@f332f7f.

from eddn.

cmmcleod avatar cmmcleod commented on July 26, 2024

If anyone is looking for data, and schema examples everything is available here:

https://github.com/cmmcleod/coriolis/tree/master/data

Just an FYI :)

from eddn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.