0.1 and 0.2 merged

Petter Reinholdtsen pere at hungry.com
Wed Feb 8 00:02:50 CET 2017


[Thomas Sødring]
> No it was not my intention, but merging back into master was going to
> happen eventually. The code is stable enough to be master I think. I
> thought I tagged when I created the branch. But it makes sense that you
> formally tag!

Perhaps you forgot to push the tags, ie to use 'git push --tags'?

> I'm getting more errors on your script, but I think I'll let you test it
> rather than trying to figure it out myself.

I fixed a problem with it, and now it run a bit further.  I believe it
exposes bugs in your code, though.  When creating a fond, I get this
JSON back:

{
  "systemID" : "9a59f078-ce54-4128-8315-88a06903bd08",
  "tittel" : "Title of the test fonds",
  "beskrivelse" : "Description of the test fonds",
  "arkivstatus" : "Opprettet",
  "dokumentmedium" : "Elektronisk arkiv",
  "oppbevaringsted" : [ "location 1", "location3", "location2" ],
  "_links" : [ {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/arkiv/9a59f078-ce54-4128-8315-88a06903bd08/",
    "rel" : "self",
    "templated" : false
  }, {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/metadata/dokumentmedium/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/metadata/dokumentmedium/",
    "templated" : false
  }, {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/arkivskaper/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/arkivskaper/",
    "templated" : false
  }, {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/arkivdel/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/arkivdel/",
    "templated" : false
  }, {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/arkiv/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/arkiv/",
    "templated" : false
  }, {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/ny-arkivskaper",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/ny-arkivskaper/",
    "templated" : false
  }, {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/underarkiv/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/underarkiv/",
    "templated" : false
  }, {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/metadata/arkivstatus/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/metadata/arkivstatus/",
    "templated" : false
  }, {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/ny-arkivdel/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/ny-arkivdel/",
    "templated" : false
  }, {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/ny-arkiv/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/ny-arkiv/",
    "templated" : false
  } ]
}

Notice this part:

 {
    "href" : "http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/ny-arkivdel/",
    "rel" : "http://rel.kxml.no/noark5/v4/api/arkivstruktur/ny-arkivdel/",
    "templated" : false
  }

I expected the href URL to look like this:

  http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/arkiv/9a59f078-ce54-4128-8315-88a06903bd08/ny-arkivdel

I try to use the URL provided to create a new series, but fail because
http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/ny-arkivdel/ do
not exist.  Did I misunderstand the specification?

-- 
Happy hacking
Petter Reinholdtsen


More information about the nikita-noark mailing list