GithubHelp home page GithubHelp logo

swagger-open311's People

Contributors

kvlahromei avatar markaspot avatar mprencipe avatar philipashlock avatar seekayel avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

swagger-open311's Issues

Optional arguments and fields

We need to check what parameters and returned fields are optional and how we can specify them? This affects esp.:

  • request.status_notes
  • request.agency_responsible
  • request.adress_id
  • ...

Mail ron

ron AD swagger.io is waiting for a mail, if we get finished with the swagger specs ๐Ÿ˜€

Quality assurance

I would appreciate any help and esp. an review / compare / ... of this swagger definiton vs. the currently official open311 standard.

We need to check:

  • Are URLs ok?
  • Are (required / optional) parameters ok?
  • Are results (in JSON and XML) ok?
  • ...

zipcode redundant

the field request.zipcode is explicitly defined but informal also mentioned at the request.adress field:

This should be provided from most specific to most general geographic unit, eg address number or cross streets, street name, neighborhood/district, city/town/village, county, postal code .

Makes it sense to remove this additional field or do we want to add more structured adress fields?

Verification

How can we check our YAML specs against existing solutions (that represent the old specs) and vice versa?

media_url definition and workflow

This is an special (complex) case of #7 and #8 At the current doc we say:

A convention for parsing media from this URL has yet to be established, so currently it will be done on a case by case basis much like Twitter.com does. For example, if a jurisdiction accepts photos submitted via Twitpic.com, then clients can parse the page at the Twitpic URL for the image given the conventions of Twitpic.com. This could also be a URL to a media RSS feed where the clients can parse for media in a more structured way.

So we might need to discuss and define:

  • supported filetypes/content of the URLs (images, video, ...)
  • supported URLs(flickr, facebook, ...)
  • supported services and procedures to get content (e.g. Open Graph , oEmbed, crawler, ...)

data lifetime

Think about an server offering the API for a period of time. During the months/years it's getting obvious, that the configuration/scenario of the operator will change and he needs to add or change e.g. service definitions, service name or codes.

Are there any speficications how we expect that the API will deal with that?
Do we suggest to present data as "snapshots" (keep values as the were while editing the data) or do we expect to present consistent data as 'live view' ?
What we suggest about migration and backwards compability of data?

Shorten description, texts, ...

A technical doc is usual as short as possible while staying exact and accurate, So we might do some polishing at the end to avoid unessary texts and make the specification easy to read.

XOR of attributes

We have some parameters / fields that are present or (exclusive) other fields are present. For example:

  • request.id | token
  • atlon|adress
  • ...

I have no idea how we can model this logic ๐Ÿ˜•

more formal definitions

If we want to get good formal definitions (see #7 ) we might also bring some more logic into datastructures, so validation might be easier. This includes esp.:

  • attribute.code
  • attribute.order
  • service.id
  • address
  • ...

This might also result in discussions (e.g. do we consider IDs always to be strings (e.g. hashes, hex numbers, ...) or just positive integers, ...)?

Indefinite Field type for service_code and service_request_id

Summary
The spec is internally inconsistent in what JSON type it uses in its service_code and service_request_id examples. These examples don't match the type: string definition for this swagger spec.

Proposed solution: change them all to string types or change them all to integer types and clearly state the type in the spec.

TL;DR
The swagger spec specifies service_request_id and service_code as

service_code:
  type: string
  format: uid
service_request_id:
  type: string
  format: uid

Which would imply the following formats:

JSON

"service_request_id": "1335131"
"service_code": "124"

XML

<service_request_id>1335131</service_request_id>
<service_code>124</service_code>

The XML can be interpreted as either a string or an integer. Note that the spec (http://wiki.open311.org/GeoReport_v2/) defines it in its sample JSON in both ways.

Get Service List: "service_code":001
Get Service Definition: "service_code":"DMV66"

For service_request_id it is only specified in the json integer format "service_request_id":293944 this would imply that the service_request_id field is actually an Integer and not a string.

cc @zdicesare @philipashlock

extract common attributes

There are some parameters / fields repeated and might get unified. For example:

  • service_name
  • service_code
  • jurisdiction_id
  • ...

Would be good for mocking and verification, but maybe this turns out to be complex?

Response arrays for this calls?

There are some calls that confused me during modelling the spec, as (to me) it seems strange that they seem to realize an array / 1:n relation
open311 arrays

  • POST Service Request
  • GET service_request_id from a token
  • GET Service Request

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.