mwapi_responses_derive 0.5.1

Automatically generate strict types for MediaWiki API responses (macro)
Documentation
{
  "name": "query+info",
  "mode": "prop",
  "fieldname": "pages",
  "prop": "inprop",
  "fields": [
    {
      "name": "contentmodel",
      "type_": "String",
      "prop": "=default"
    },
    {
      "name": "pagelanguage",
      "type_": "String",
      "prop": "=default"
    },
    {
      "name": "pagelanguagehtmlcode",
      "type_": "String",
      "prop": "=default"
    },
    {
      "name": "pagelanguagedir",
      "type_": "String",
      "prop": "=default"
    },
    {
      "name": "touched",
      "type_": "Option<::mwapi_responses::mwtimestamp::Timestamp>",
      "prop": "=default"
    },
    {
      "name": "lastrevid",
      "type_": "Option<u64>",
      "prop": "=default"
    },
    {
      "name": "length",
      "type_": "Option<u32>",
      "prop": "=default"
    },
    {
      "name": "redirect",
      "type_": "bool",
      "default": true,
      "prop": "=default"
    },
    {
      "name": "new",
      "type_": "bool",
      "default": true,
      "prop": "=default"
    },
    {
      "name": "restrictiontypes",
      "type_": "Vec<String>",
      "prop": "protection"
    },
    {
      "name": "protection",
      "type_": "Vec<mwapi_responses::protection::ProtectionInfo>",
      "prop": "protection"
    },
    {
      "name": "talkid",
      "type_": "Option<u32>",
      "prop": "talkid"
    },
    {
      "name": "watched",
      "type_": "bool",
      "prop": "watched"
    },
    {
      "name": "watchers",
      "type_": "Option<u32>",
      "prop": "watchers"
    },
    {
      "name": "visitingwatchers",
      "type_": "Option<u32>",
      "prop": "visitingwatchers"
    },
    {
      "name": "notificationtimestamp",
      "type_": "Option<::mwapi_responses::mwtimestamp::Timestamp>",
      "prop": "notificationtimestamp",
      "deserialize_with": "::mwapi_responses::timestamp::deserialize_notificationtimestamp"
    },
    {
      "name": "subjectid",
      "type_": "Option<u32>",
      "prop": "subjectid"
    },
    {
      "name": "associatedpage",
      "type_": "String",
      "prop": "associatedpage"
    },
    {
      "name": "fullurl",
      "type_": "String",
      "prop": "url"
    },
    {
      "name": "editurl",
      "type_": "String",
      "prop": "url"
    },
    {
      "name": "canonicalurl",
      "type_": "String",
      "prop": "url"
    },
    {
      "name": "preload",
      "type_": "Option<String>",
      "prop": "preload"
    },
    {
      "name": "displaytitle",
      "type_": "String",
      "prop": "displaytitle"
    },
    {
      "name": "varianttitles",
      "type_": "HashMap<String, String>",
      "default": true,
      "prop": "varianttitles"
    },
    {
      "name": "linkclasses",
      "type_": "Vec<String>",
      "default": true,
      "prop": "linkclasses"
    }
  ],
  "test_extra": {
    "assert": {
      "continue": false,
      "length": 3
    },
    "params": {
      "titles": "Taylor Swift|Talk:Taylor Swift|This article does not exist, please"
    }
  }
}