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

JSON Schema - metadata.title/subtitle, harmonization with ReadiumWebPubManifest? #24

Open
danielweck opened this issue Dec 28, 2018 · 8 comments
Labels

Comments

@danielweck
Copy link
Member

The main difference (besides the looser type definition) is that OPDS subtitles allow arrays:

    "subtitle": {
      "type": [
        "string",
        "array",
        "object"
      ]
},

versus:

https://github.com/readium/webpub-manifest/blob/0976680e25852b8a4c4802a052ba750ab3e89284/schema/metadata.schema.json#L33

    "subtitle": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "description": "The language in a language map must be a valid BCP 47 tag.",
          "type": "object",
          "patternProperties": {
            "^((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUse>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUse2>x(-[A-Za-z0-9]{1,8})+))$": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "minProperties": 1
        }
      ]
},
@danielweck
Copy link
Member Author

@danielweck danielweck changed the title JSON Schema - metadata.subtitle, harmonization with ReadiumWebPubManifest? JSON Schema - metadata.title/subtitle, harmonization with ReadiumWebPubManifest? Dec 28, 2018
@danielweck
Copy link
Member Author

Related issue: #25

@HadrienGardeur
Copy link
Member

They're a little undefined in the current draft as well, so their current expression in the JSON Schema is consistent with that.

It's not clear if we need all that complexity for the metadata of a feed, or if we need a subtitle either.

@acuna-public
Copy link

It's so sad that new draft don't supports Readium manifest which is more user-friendly for develop it :(

@HadrienGardeur
Copy link
Member

@acuna-public since OPDS 2.0 is very much based on Readium, it's not clear what you mean by that.

@acuna-public
Copy link

acuna-public commented Jun 22, 2020

@HadrienGardeur I've created an issue here. Please compare the draft and docs, for example links section became as

"links": [
    {"rel": "self", "href": "http://example.com/opds", "type": "application/opds+json"}
  ]

in the docs, but at the draft which link present at the end of the docs as an example it became

"links": {
    "description": "Feed-level links such as search or pagination",
    "type": "array",
    "items": {
         "$ref": "https://readium.org/webpub-manifest/schema/link.schema.json"
    },
    "uniqueItems": true,
    "contains": {
    "properties": {
            "rel": {
                "anyOf": [
                    {
                        "type": "string",
                        "const": "self"
                    },
                    {
                        "type": "array",
                        "contains": {
                            "const": "self"
                        }
                    }
                ]
            }
        },
        "required": [
            "rel"
        ]
    }
},

Or I've missed something?

@HadrienGardeur
Copy link
Member

HadrienGardeur commented Jun 22, 2020

Basically this schema means:

  • that the definition of the Link Object is based on Readium: https://readium.org/webpub-manifest/schema/link.schema.json
  • that each Link Object must be unique (which can't be moved to the Link Object schema)
  • that we must have at least one Link Object where the rel value is set to self (that's a requirement for an OPDS Feed)

Could you explain why this is problematic?

@acuna-public
Copy link

I believe that it means anywhere, but I don't see it at the docs. I think you don't want to users asked you about any of the item so you create the docs, isn't it? :) So I've implemented any what described in docs only for cosily support it in future.

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

No branches or pull requests

3 participants