codeforamerica / open311_java

Java language binding (wrapper) to the Open311 REST API
BSD 3-Clause "New" or "Revised" License
12 stars 5 forks source link

Invalid Cities #15

Open milovanderlinden opened 8 years ago

milovanderlinden commented 8 years ago

I have added a test that loops through the City enum and checks if the Discovery request is valid. Through this test, I get a pretty solid insight on the endpoints that have a PRODUCTION endpoint available.

Summary:

This is the result:

Processing City: TORONTO
Skipped GIESSEN, error: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 215 path $.endpoints
Processing City: BONN
Processing City: ROSTOCK
Processing City: HELSINKI
Skipped LAMIA, error: null
Processing City: BALTIMORE
Processing City: BLOOMINGTON
Processing City: BOSTON
Processing City: BROOKLINE
Processing City: CHICAGO
Processing City: COLUMBUS
Processing City: GRAND_RAPIDS
Skipped PEORIA, error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Processing City: SAN_FRANCISCO
Skipped WASHINGTON, error: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 2 column 1 path $
Processing City: EINDHOVEN
Processing City: QUEBEC
Processing City: SURREY
Skipped ZURICH, error: null
Skipped ZARAGOZA, error: null
Skipped LISBOA, error: null
Processing City: PHILADELPHIA
[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped ALPHARETTA, error: Content is not allowed in prolog.

Skipped BAINBRIDGE_ISLAND, error: Content is not allowed in prolog.[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped CORONA, error: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped DELEON, error: Content is not allowed in prolog.

Skipped DUNWOODY, error: Content is not allowed in prolog.[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped HUNTSVILLE, error: Content is not allowed in prolog.
Skipped NEWBERG, error: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped NEW_HAVEN, error: Content is not allowed in prolog.

Skipped RICHMOND, error: Content is not allowed in prolog.[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped RUSSELL_SPRINGS, error: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped TUCSON, error: Content is not allowed in prolog.
Skipped DARWIN, error: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped FONTANA, error: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped HOWARD, error: Content is not allowed in prolog.
Skipped MANOR, error: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped NEWNAN, error: Content is not allowed in prolog.

[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped OLATHE, error: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped RALEIGH, error: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped ROOSEVELT, error: Content is not allowed in prolog.
[Fatal Error] :1:1: Content is not allowed in prolog.
Skipped HILLSBOROUGH, error: Content is not allowed in prolog.
milovanderlinden commented 8 years ago

I managed to implement some fixes. The list is now down to 7 faulty endpoints and 35 that can be connected.

Processing City: TORONTO
Processing City: GIESSEN
Processing City: BONN
Processing City: ROSTOCK
Processing City: HELSINKI
Processing City: BALTIMORE
Processing City: BLOOMINGTON
Processing City: BOSTON
Processing City: BROOKLINE
Processing City: CHICAGO
Processing City: COLUMBUS
Processing City: GRAND_RAPIDS
Skipped PEORIA, APIWrapperException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Processing City: SAN_FRANCISCO
Skipped WASHINGTON, APIWrapperException: Invalid response type - html
Processing City: EINDHOVEN
Processing City: QUEBEC
Processing City: SURREY
Processing City: ZURICH
Skipped ZARAGOZA, NullPointerException: null
Processing City: LISBOA
Processing City: PHILADELPHIA
Skipped ALPHARETTA, APIWrapperException: Invalid response - Not Found
Processing City: BAINBRIDGE_ISLAND
Processing City: CORONA
Skipped DELEON, APIWrapperException: Invalid response - Not Found
Processing City: DUNWOODY
Processing City: HUNTSVILLE
Processing City: NEWBERG
Processing City: NEW_HAVEN
Processing City: RICHMOND
Skipped RUSSELL_SPRINGS, APIWrapperException: Invalid response - Not Found
Skipped TUCSON, APIWrapperException: Invalid response - Not Found
Processing City: DARWIN
Processing City: FONTANA
Processing City: HOWARD
Processing City: MANOR
Processing City: NEWNAN
Processing City: OLATHE
Processing City: RALEIGH
Processing City: ROOSEVELT
Processing City: HILLSBOROUGH