Skip to content

Latest commit

 

History

History
511 lines (507 loc) · 21.4 KB

File metadata and controls

511 lines (507 loc) · 21.4 KB

api-checker TODOs

Mavenize

Move Normalizer code to a lib in WADL tools.

Schema for checker XML (XSD 1.1)

File Xerces Bugs[2/2]

  1. [X] assert error
  2. [X] multiple ID error in cli validator

WADL Normalize, Builder, opt1, checker2dot in a single PATH.

Maybe an optional output?

CLI for translation?

Implement validator [9/9]

  1. [X] Implement dispatch handler
  2. [X] Create assert handler
  3. [X] Simple tests on validator [6/6]
    1. [X] GET a/b
    2. [X] Empty machine
    3. [X] GET on regex
    4. [X] GET on an allow all regex
    5. [X] Method regex
    6. [X] Complex URI tests
  4. [X] Unit test steps [6/6]
    1. [X] Start
    2. [X] Accept
    3. [X] MethodFail
    4. [X] URLFail
    5. [X] URI
    6. [X] Method
  5. [X] Clean up console handler…should be more readable
  6. [X] Add Fail Matchers[5/5]
    1. [X] Add URL Fail Matcher
    2. [X] Add Method Fail Matchers
    3. [X] Test URL Fail Matcher
    4. [X] Test Method Fail Matcher
    5. [X] Update validation tests to use both matchers
  7. [X] Capture attempt in error steps
  8. [X] Quickly extract correct error in multi-result case
  9. [X] Assert that validator tests above return the correct error

Checker to scala.[6/6]

  1. [X] Build support for method/uri fail match in schema
  2. [X] Populate method/uri fail match in checker conversion
  3. [X] Update dot conversion to accunt for method/uri fail match
  4. [X] Checker to scala as a handler – possibly passing to an other handler
  5. [X] Add support in validator
  6. [X] Test conversion..including new error states.

Updates to XSD Schema[3/3]

  1. [X] Checker should allow only one start node.
  2. [X] Method must always have next nodes.
  3. [X] Add grammar section (type, namespace, href)

WADL Normalize, Builder, opt1 in a single path [5/5]

  1. [X] Add Builder Library
  2. [X] Support Grammar in checker format[2/2]
    1. [X] Add support for grammar in checker format
    2. [X] Generate checker format with grammars
  3. [X] Simple transation tests to confirm the lib is working [6/6]
    1. [X] Test URI and Method from various WADL configurations[13/13]
      1. [X] Emtpty WADL
      2. [X] URL/Method single resource
      3. [X] URL/Method single resource (tree)
      4. [X] URL/Method single resource (mixed)
      5. [X] Method Reference
      6. [X] Resource Type
      7. [X] Resource Type with Method Reference
      8. [X] Multiple Resource PATHs
      9. [X] Multiple Resource PATHs (tree)
      10. [X] Multiple Resource PATHs (mixed)
      11. [X] Mulitple Resource PATHs (disconnected)
      12. [X] Multiple Resource PATHs (disconnected, tree)
      13. [X] Multiple Resource PATHs (disconnected, mixed)
    2. [X] Other misc Translation tests [2/2]
      1. [X] State Labels
      2. [X] rax:invisible extension
    3. [X] Ensure that input WADLs are correct before tests are run.
    4. [X] Test Path Templates[4/4]
      1. [X] String templates[7/7]
        1. [X] At the end of the path
        2. [X] At the end of the path (tree)
        3. [X] At the end of the path (mixed)
        4. [X] In between path
        5. [X] In between path (tree)
        6. [X] In between path (mixed)
        7. [X] Different prefix
      2. [X] Test Path Templates of other types[9/9]
        1. [X] At the end of the path
        2. [X] At the end of the path (tree)
        3. [X] At the end of the path (mixed)
        4. [X] In between path
        5. [X] In between path (tree)
        6. [X] In between path (mixed)
        7. [X] Test default QName type
        8. [X] Test default QName type (tree)
        9. [X] Test default QName type (mixed)
      3. [X] Resource/Parameter mismatch[4/4]
        1. [X] Name MisMatch
        2. [X] Missing parameter
        3. [X] Bad Parameter type
        4. [X] Bad QName
      4. [X] RegEx Encoding[2/2]
        1. [X] In URL
        2. [X] In Method
    5. [X] Write tests for multi-method target
    6. [X] WADL Grammar[2/2]
      1. [X] External Grammar[6/6]
        1. [X] File Available, add to checker
        2. [X] Multiple available files
        3. [X] Relative paths
        4. [X] Missing File should fail
        5. [X] Should not fail with unknown XML
        6. [X] Should not fail with unknown unparsed-text
      2. [X] Inline Grammar
  4. [X] Add Opt as an option, by pipeing through removeDups
  5. [X] Simple optimization test to confirm functionality[9/9]
    1. [X] OPT on but no duplicates
    2. [X] OPT on but no duplicates (tree)
    3. [X] OPT on but no duplicates (mixed)
    4. [X] A single duplicate
    5. [X] A single duplicate (tree)
    6. [X] A single duplicate (mixed)
    7. [X] Multiple duplicates
    8. [X] Multiple duplicates (tree)
    9. [X] Multiple duplicates (mixed)

URLXSD types [6/6]

  1. [X] URLXSD node
  2. [X] URLXSD/URL Fail nodes
  3. [X] step handler – external grammar
  4. [X] WADL XSD tests
  5. [X] step handler – inline grammar
  6. [X] WADL XSD tests – inline

API Checker Servlet Filter[4/4]

  1. [X] Default Servlet Result Handler
  2. [X] Initial Filter Project
  3. [X] Simple config and handler – simple WADL
  4. [X] Save DOT

Propigate XSD type errors correctly

Add stage to check well formed XML [11/11]

  1. [X] Add support for WELL_XML, WELL_JSON, CONTET_FAIL in XSD
  2. [X] Add support in XSLs
  3. [X] Setup configuration to check for well formness
  4. [X] Update cli tools with new config
  5. [X] Write next connected step in less functional style to avoid calls
  6. [X] XML
    1. [X] Create document parse pool
    2. [X] Create WELL_XML state type using parse pool
    3. [X] Check to make sure that the XML hasn’t already been parsed.
  7. [X] Create CONTENT_FAIL state
  8. [X] JSON (Setup Skeleton Only)
  9. [X] Connect states with handler
  10. [X] Tests [5/5]
    1. [X] States
    2. [X] Validator
    3. [X] Checker Tests
    4. [X] Step Builder Tests
    5. [X] WADL Validation
  11. [X] Update sample filter / webapp

Add checks for well formed JSON [3/3]

  1. [X] Add Parser Pool
  2. [X] Update JSON stage
  3. [X] Add JSON Tests
    1. [X] States
    2. [X] Checker Tests
    3. [X] Step Builder Tests
    4. [X] Validator
    5. [X] WADL Validation

Respond to Xerces JIRA

Add support for schema XML schema check [10/10]

  1. [X] Add support for XSD_CHECK in XSD
  2. [X] Add XSD check in config
  3. [X] Add support for XSD check in XSLs
  4. [X] Update CLI tools if nessesary
  5. [X] Create schema parse pool if nessesary
  6. [X] Transition other XSD checks to use pool
  7. [X] Create XSD check state
  8. [X] Add support for check state in the builder
  9. [X] Tests[7/7]
    1. [X] States
    2. [X] Checker Tests
    3. [X] Step Builder Tests
    4. [X] WADL Validator
    5. [X] Schema pool test
    6. [X] Test on parameter check / include test for WELL_FORM to
    7. [X] Test on grammar checks when no grammar is available.
  10. [X] Update sample filter / webapp

Bean attributes for config

New Join Optimization stage.

Extend machine to handle correct element in XML [10/10]

  1. [X] Add support for XPATH step in XSD
  2. [X] Add Element Check in config
  3. [X] Add support for Element check in XSLs
  4. [X] Update CLI tools
  5. [X] Add XPath Pool
  6. [X] Create XPath State
  7. [X] Add support XPath sate in builder
  8. [X] New Config XPath version [4/4]
    1. [X] 1.0 based on Xalan (default)
    2. [X] 2.0 based on Saxon (non-schema aware – unless you have license)
    3. [X] Allow setting of version in checker format.
    4. [X] Take version into account when optimizing states
  9. [X] Tests[6/6]
    1. [X] XPath parser pool
    2. [X] ImmutableNamespaceContext
    3. [X] States[2/2]
      1. [X] XPath 1.0
      2. [X] XPath 2.0
    4. [X] Checker Tests
      1. [X] Tests with XSD stages.
      2. [X] Tests without XSD stages.
      3. [X] Element test without well formed specified.
      4. [X] Should check case no element is specified.
      5. [X] Check with dups vs no-dups
    5. [X] Step Builder Tests
    6. [X] WADL Validator
      1. [X] XPath 1.0
      2. [X] XPath 2.0
  10. [X] Update filter / filter app

Extend machine to check required plain parameters[5/5]

  1. [X] Add required plain param in config
  2. [X] Add support for check in XSLs
  3. [X] Update CLI tools
  4. [X] Tests[2/2]
    1. [X] Checker Tests[12/12]
      1. [X] Multiple xpaths in a single rep
      2. [X] Multiple rep with single xpath
      3. [X] Mix number of xpath and rep
      4. [X] Required == false
      5. [X] Without XSD checks
      6. [X] Without Element checks
      7. [X] With No Element, but element checks on
      8. [X] No Well-form checks
      9. [X] Without XSD and Element checks
      10. [X] Namespace copy test
      11. [X] Same element multiple representations
      12. [X] Dups
    2. [X] WADL Validator tests
      1. [X] XPath 1.0
      2. [X] XPath 2.0
      3. [X] XPath 2.0 (only 2.0 capa)
  5. [X] Update to filter-app

XSD Transform [9/9]

  1. [X] Add XSD transform option to config
  2. [X] Add support for XSD transform in XSD
  3. [X] Add support for XSD transform in XSD step
  4. [X] Add support for XSD transform in Handler
  5. [X] Handle config change correctly in XSL
  6. [X] Handle set and not set in dups options
  7. [X] Add support for communicationg content upstream [4/4]
    1. [X] Identity transform pool – just pick a factory (Xalan, XalanC, Saxon)
    2. [X] XML
    3. [X] JSON
    4. [X] Other / None
  8. [X] Update filter-app return data optionally
  9. [X] Tests [2/2]
    1. [X] Ensure that checker sets options correctly
    2. [X] Make sure content is communicated upstream [3/3]
      1. [X] Transform fatory identity test.
      2. [X] New validator step tests [6/6]
        1. [X] Existing TESTs with transform == true
        2. [X] Existing TESTs with transform == true (SAXON)
        3. [X] Confirm options are filled in
        4. [X] Confirm options are filled in (SAXON)
        5. [X] Well-Form XML – reparse XML
        6. [X] Well-Form JSON – reparse JSON
      3. [X] WADL Validator Tests [2/2]
        1. [X] Existing XSD tests with transform == true (Xerces / Saxon)
        2. [X] Validate with transforms and options on XML (Xerces / Saxon), new tests.

Preprocess Step [12/12]

  1. [X] Add support for XSL step in XSD
  2. [X] Add support for preprocess in config
  3. [X] Add support for XSL 1.0 engine
  4. [X] Add support for preprocess in XSLs
  5. [X] Update CLI tools
  6. [X] Update WADL tools to handle @href in rax:* extensions
  7. [X] Add Transform Pool
  8. [X] Create Transform State
  9. [X] Add XSLT version (1, 2)?
  10. [X] Add support for preprocess in builder
  11. [X] Update filter / filter app
  12. [X] Tests[4/4]
    1. [X] Transform pool
    2. [X] Steps
      1. [X] XSL 1.0
      2. [X] XSL 2.0
    3. [X] Checker Tests [6/6]
      1. [X] Tests with XSL Stages
      2. [X] Tests with multiple XSLs in the same representation
      3. [X] Tests with multiple XSLs in different representations
      4. [X] Dups vs noDups
      5. [X] Tests without XSD stanges
      6. [X] Preprocess without well formed specified, etc
    4. [X] WADL Validator [2/2]
      1. [X] XSLT 1.0 (Xalan-C)
      2. [X] XSLT 2.0 (Saxon)

Reintroduce THROW exception behavior in ErrorCapture

Inline XSL should be supported in XSL step [4/4]

  1. [X] Confirm that XSL servies WADL tools translation / fix if not.
  2. [X] Confirm builder copies emebed xsl
  3. [X] Modify step handler to compile templates
  4. [X] Tests [3/3]
    1. [X] Add builder XSL test
    2. [X] Add validator tests: embeded namespaces
    3. [X] Add validator tests: parent namespaces

XPath join optimization [9/9]

  1. [X] Create XPath join XSL
  2. [X] Add XPath join config option
  3. [X] Extend XSL stage to read from IOStream is there is no parsed XML
  4. [X] Add new optional stage to builder
  5. [X] Update CLI tools
  6. [X] Update Filter / Filter Test App
  7. [X] Extend XSL stage to handle error messages
  8. [X] If any step is XSL2 or XPath2, then use XPath2 for the XSL.
  9. [X] Test [3/3]
    1. [X] Enable Optimization in multi-xpath checker tests
    2. [X] Checker tests with xpath 2
    3. [X] Ensure that validaTor Xpath tests work with validator

Check Headers in Resource[9/9]

  1. [X] Added option to config
  2. [X] Extends XSD
  3. [X] Add support in XSL [1/1]
    1. [X] Headers on resource
  4. [X] Handle config in CLI tools
  5. [X] Add support in opt XSLs
  6. [X] Add Header Steps
  7. [X] Update handler for new steps
  8. [X] Update filter / filter test app
  9. [X] Tests[4/4]
    1. [X] Extend HTTP request mocks to handle headers
    2. [X] Add step tests
    3. [X] Handler tests
    4. [X] WADL validator tests [2/2]
      1. [X] .* Test
      2. [X] XSD Test

Headers on Request [2/2]

  1. [X] Implement headers on request
  2. [X] Tests [2/2]
    1. [X] Handler Tests
      1. [X] Request header only
      2. [X] Request and Resource headers
    2. [X] WADL validator tests [3/3]
      1. [X] .* Test (Request)
      2. [X] XSD Test (Request)
      3. [X] Mixed Request / Resource

MediaType fixes [4/4]

  1. [X] Support /
  2. [X] Support type / *
  3. [X] Igrnore ; params
  4. [X] Test [3/3]
    1. [X] Update existing mediaType tests
    2. [X] Builder [3/3]
      1. [X] /
      2. [X] type / *
      3. [X] ; params, Specified
    3. [X] Validator [4/4]
      1. [X] /
      2. [X] type / *
      3. [X] ; params, Ignored
      4. [X] ; params, Specified

Ignore XSD extension [5/5]

  1. [X] Add Config Option
  2. [X] Update CLI utils, filter test app
  3. [X] Handle in builder.xsl
  4. [X] Handler Tests
  5. [X] WADL validator tests

Instrument Code[3/3]

  1. [X] Update TO Scala 2.9.1 (Needed for yammer mettrics)
  2. [X] Add support for yammer metrics
  3. [X] Instrument [12/12]
    1. [X] XML Pool
    2. [X] JSON Pool
    3. [X] Transform Pool
    4. [X] Schema Pool
    5. [X] xPath Pool
    6. [X] Validator
    7. [X] Error Rates
    8. [X] Allow validators to be named
    9. [X] Instrument Handler
    10. [X] JMX Operation to get checker
    11. [X] Cleanup
    12. [X] Keep track of last X errors.

rax:message XPath extension [8/8]

  1. [X] Extend XSD to allow message in XPath
  2. [X] Extend builder XSL to add message in XPath state
  3. [X] Extend state to accept message in XPath
  4. [X] Extend handler to pass message over
  5. [X] Add rax:message flag
  6. [X] Add extension to cli
  7. [X] Make join optimization aware of the extesion.
  8. [X] TESTS [3/3]
    1. [X] State
    2. [X] Builder
    3. [X] Validator

rax:code for XPath message [7/7]

  1. [X] Allow passing code to content error state (Defualt 400)
  2. [X] Extend XSD to allow code in XPath
  3. [X] Extend builder XSL to add code in XPath state
  4. [X] Modify XPath State to accept code
  5. [X] Extend handler to pass code over
  6. [X] Make join optimization aware of the extension
  7. [X] TESTS [4/4]
    1. [X] State
    2. [X] Builder
    3. [X] Validator
    4. [X] Test XPath Join on [3/3]
      1. [X] XSL 2.0
      2. [X] Xalan 1.0
      3. [X] XalanC 1.0

Add support for JSONSchema in body [9/9]

  1. [X] Add support for JSON_SCHEMA_CHECK in XSD
  2. [X] Add JSON_SCHEMA_CHECK in configs
  3. [X] Add support for check in XSLs, include support for rax:ignore-jsonschema
  4. [X] Update CLI tools
  5. [X] Create JSON-Schema check state
  6. [X] Add support for schema check in the builder
  7. [X] Adjust error reporting?
  8. [X] Use JSON Node instead of token buffer?
  9. [X] Tests [4/4]
    1. [X] States
    2. [X] Checker Tests
    3. [X] Tests when no grammar is available
    4. [X] WADL Validator Tests

Header Enhancements [3/4]

  1. [X] Multiple header checks with the same name [4/4]
    1. [X] Allow checks in steps via enumeration
    2. [X] Support for single header with comma sererated list
    3. [X] Add Header step tests [2/2]
      1. [X] Saxon
      2. [X] Xerces
    4. [X] Add WADL validator tests [2/2]
      1. [X] Saxon
      2. [X] Xerces
  2. [X] Handle fixed headers [6/6]
    1. [X] Extend XSD to support Header Any[2/2]
      1. [X] Header Any regex
      2. [X] Header Any XSD
    2. [X] Add support in XSL
    3. [X] Write HeaderAny steps[2/2]
      1. [X] Header Any regex
      2. [X] Header Any XSD
    4. [X] Update handler for new step
    5. [X] Add Tests [3/3]
      1. [X] Step Test
      2. [X] WADL Builder Tests
      3. [X] WADL validator Tests
    6. [X] Join fixed headers opt?
  3. [X] Add support for rax:code and rax:message in Header checks [6/6]
    1. [X] Extend XSD to allow passing code, message to Header States
    2. [X] Extend builder XSL to add code, message
    3. [X] Make sure join optimizations are aware of the extension
    4. [X] Modify Header states to accept code, message
    5. [X] Modify handler to plug in state correctly
    6. [X] TESTS [3/3]
      1. [X] State
      2. [X] Builder
      3. [X] Validator
  4. [ ] Handle default headers

PreProc Enhancements [0/5]

  1. [ ] Preproc and XSL step should be able to change content type
  2. [ ] Preporc should support XSL parameters
  3. [ ] JSONx should be supported
  4. [ ] Should be able to use in not xml types
  5. [ ] Write test with noJoin on actual error message produced.

XPath check enhancements[0/6]

  1. [ ] Better errors when multiple XPath expressions fail – display.
  2. [ ] Normalize namespaces correctly in XPATHs from WADL – prune only the namespaces that you use.
  3. [ ] WADL extension to support XPath 2.0 (xpathversion=2.0)
  4. [ ] Clark notation for error messages.
  5. [ ] Combine XPath optimization
  6. [ ] Tests
    1. [ ] Prove that better error messages are working correctly with test.
    2. [ ] Tests with dups in XPath (with/without version). Dups should work well at detecting XPath with version number.
    3. [ ] Test Bad XPaths
    4. [ ] Combined XPath opt tests

Namespace Enhancements [0/2]

  1. [ ] Namespace cleanup task should look into XPath expressions
  2. [ ] Namespace cleanup task should account for default namespaces.

Log on failures

Fix test error, where register is not working in step-test.scala

Review Skipped Tests[0/2]

  1. [ ] Saxon validation
  2. [ ] WADL Tools

Saxon report error(?) where casting is always nessesary.

Support XML schema validation, adding default parameters

Modify filter to handle different groups

Better log handling…ERROR, INFO, etc..carried out to XSL as well

WADL Change Detector…

Real tests on DOT output

Expand checker to dot conversion in builder

Bring checker to dot conversion to cli

Better XSD tests

Tests 10 Threads 5000 count

Type/images/image/images/detail/images/details/images/de31d986-a7be-11e1-994a-bba4de7e4604/images/de31d986-a7be-11e1-994a-bba4de7e460z
XERCES2498.12171.21024.7877.11037.0777.0
SAXON2519.32113.21898.11851.41997.11634.0

After schema pool and non-functional dispatch

Type/images/image/images/detail/images/details/images/de31d986-a7be-11e1-994a-bba4de7e4604/images/de31d986-a7be-11e1-994a-bba4de7e460z
XERCES2504.12274.22424.81695.02221.31667.2
SAXON2484.32227.82329.81714.02209.61639.2