@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Erskine May API
@version v1
@endpoints 11
@toc api(11)

@endpoint GET /api/Chapter/{chapterNumber}
@required {chapterNumber: int(int32)}
@returns(200) {partNumber: int(int32), number: int(int32), title: str?, description: str?, sections: [map]?}
@errors {400, 404}

@endpoint GET /api/IndexTerm/browse
@optional {startLetter: str, skip: int(int32)=0, take: int(int32)=20}
@returns(200) {searchTerm: str?, skip: int(int32), take: int(int32), totalResults: int(int32), searchResults: [map]?, searchTerms: [str]?, suggestedSearch: str?}

@endpoint GET /api/IndexTerm/{indexTermId}
@required {indexTermId: int(int32)}
@returns(200) {id: int(int32), term: str?, displayAs: str?, seeLinks: [map]?, references: [map]?, parentTerm: map{id: int(int32), term: str?, displayAs: str?, seeLinks: [map]?, references: [map]?, parentTerm: map{id: int(int32), term: str?, displayAs: str?, seeLinks: [map]?, references: [map]?, parentTerm: map{id: int(int32), term: str?, displayAs: str?, seeLinks: [map]?, references: [map]?, parentTerm: map, childTerms: [map]?}, childTerms: [map]?}, childTerms: [map]?}, childTerms: [map]?}
@errors {400, 404}

@endpoint GET /api/Part
@returns(200)

@endpoint GET /api/Part/{partNumber}
@required {partNumber: int(int32)}
@returns(200) {number: int(int32), title: str?, description: str?, chapters: [map]?}
@errors {400, 404}

@endpoint GET /api/Search/IndexTermSearchResults/{searchTerm}
@required {searchTerm: str}
@optional {skip: int(int32)=0, take: int(int32)=20}
@returns(200) {searchTerm: str?, skip: int(int32), take: int(int32), totalResults: int(int32), searchResults: [map]?, searchTerms: [str]?, suggestedSearch: str?}

@endpoint GET /api/Search/Paragraph/{reference}
@required {reference: str}
@returns(200) {id: int(int32), title: str?, titleChain: str?, subSections: [map]?}
@errors {400, 404}

@endpoint GET /api/Search/ParagraphSearchResults/{searchTerm}
@required {searchTerm: str}
@optional {skip: int(int32)=0, take: int(int32)=20}
@returns(200) {searchTerm: str?, skip: int(int32), take: int(int32), totalResults: int(int32), searchResults: [map]?, searchTerms: [str]?, suggestedSearch: str?}

@endpoint GET /api/Search/SectionSearchResults/{searchTerm}
@required {searchTerm: str}
@optional {skip: int(int32)=0, take: int(int32)=20}
@returns(200) {searchTerm: str?, skip: int(int32), take: int(int32), totalResults: int(int32), searchResults: [map]?, searchTerms: [str]?, suggestedSearch: str?}

@endpoint GET /api/Section/{sectionId}
@required {sectionId: int(int32)}
@returns(200) {id: int(int32), title: str?, titleChain: str?, subSections: [map]?, parentSectionId: int(int32)?, parentSectionTitle: str?, chapterNumber: int(int32), chapterTitle: str?, partNumber: int(int32), partTitle: str?, contentHtml: str?, isUpdated: bool, updatedDate: str(date-time)?, footnotes: [map]?}
@errors {400, 404}

@endpoint GET /api/Section/{sectionId},{step}
@required {sectionId: int(int32), step: int(int32)}
@returns(200) {id: int(int32), title: str?, titleChain: str?, subSections: [map]?}
@errors {400, 404}

@end
