Skip to content

Commit

Permalink
Refactors lottery and lottery results
Browse files Browse the repository at this point in the history
  • Loading branch information
Grant Kinney committed Oct 5, 2017
1 parent 46ce0b4 commit 5fc9bba
Showing 1 changed file with 80 additions and 78 deletions.
158 changes: 80 additions & 78 deletions swagger/swagger-listing+prefrefact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,12 @@ paths:
description: An array of listing
schema:
$ref: '#/definitions/ListingResult'
'/Listing/LotteryResult/{listingID}/{lotteryNumber}':
'/Listing/LotteryResult/{lotteryNumber}':
get:
description: >-
This returns the Listing result - with 1 applicationResult inside this
is the Application with the appropriate lottery number. If no
lotteryNumber fits, applicationsResult will be empty. If listing
isIncorrect it will error.
This returns lottery results for a lottery number. If no lottery number
is found it will return a not found response.
parameters:
- name: listingID
in: path
description: listingID for lottery
required: true
type: string
- name: lotteryNumber
in: path
description: lottery number to look up
Expand All @@ -185,16 +178,16 @@ paths:
- Listing
responses:
'200':
description: An array of listing
description: Lottery results for an application
schema:
$ref: '#/definitions/LotteryResult'
'/Listing/LotteryResult/{listingID}':
'404':
description: Lottery number not found
'/Listing/Lottery/{listingID}':
get:
description: >-
This returns the Listing result - with 1 applicationResult inside this
is the Application with the appropriate lottery number. If no
lotteryNumber fits, applicationsResult will be empty. If listing
isIncorrect it will error.
This returns the lottery information for a listing. If listingID is
incorrect it will error.
parameters:
- name: listingID
in: path
Expand All @@ -207,7 +200,7 @@ paths:
'200':
description: An array of listing
schema:
$ref: '#/definitions/LotteryResult'
$ref: '#/definitions/Lottery'
'/ListingDetails/{sfdcid}':
get:
description: This returns the Listing information and its summary information.
Expand Down Expand Up @@ -1315,84 +1308,127 @@ definitions:
hasDevelopmentalDisability:
type: string
description: 'Answer to question about disability: "Yes" or "No", defaults to blank.'
LotteryResult:
Lottery:
type: object
description: lottery result
properties:
listingID:
type: string
description: listing ID
LotteryBuckets:
description: Listing ID
preferences:
type: array
items:
$ref: '#/definitions/LotteryBucket'
$ref: '#/definitions/ListingPreference'
generalPool:
type: object
description: General lottery pool information
properties:
totalSubmittedApps:
type: integer
description: Total number of applications in the general lottery bucket
unitsAvailable:
type: integer
description: Total units availble for general lottery
URL:
type: string
description: randome.org url
description: Is this used?
lotteryResultsURL:
type: string
description: link to a file
description: Location of lottery results PDF
lotteryAppTotal:
type: number
description: total applications for lottery
type: integer
description: Total number of applications in lottery
lotteryCity:
type: string
description: listing lottery City
description: City where the lottery is run
lotteryDate:
type: string
format: date
description: 'lottery date '
description: Date of the lottery
lotteryEndTime:
type: string
format: date
description: 'lottery date '
description: Is this used?
lotteryPreferences:
type: string
description: preferences
description: Is this used?
lotteryResults:
type: boolean
description: lotteryResults
description: If the lottery has results
officeHours:
type: string
description: office hours
description: Is this used?
LotteryResult:
type: object
description: Lottery result for a lottery number
properties:
applicationID:
type: string
description: Id of application
lotteryNumber:
type: string
description: Lottery number
lotteryRank:
type: integer
format: int32
description: Unfiltered lottery rank returned from drawing
lotteryPreferences:
type: array
items:
type: object
description: 'Preferences the applicant qualified for with rankings, if available'
properties:
listingPreferenceId:
type: string
preferenceName:
type: string
preferenceRank:
type: integer
generalPoolRank:
type: integer
description: >-
Rank in general lottery if applicant did not qualify or claim any
preferences
ListingPreference:
type: object
description: Listing preference
properties:
listingPreferenceID:
type: string
description: salesforce ID
description: Salesforce ID
listingID:
type: string
description: listing salesforce ID
description: Listing Salesforce ID
name:
type: string
description: preference
description: Listing preference number
preferenceName:
type: string
description: preference name
description: Name of preference
order:
type: number
description: order to display in
description: Order to display in list of preferences
pdfUrl:
type: string
description: pdf url
description: >-
Location of PDF with which lottery numbers that qualified for
preference
description:
type: string
description: description
description: Listing preference description
readMoreUrl:
type: string
format: url
description: readMore Url
NRHP District:
description: Location of more information about preference
NRHPDistrict:
type: string
description: 'neighborhood district '
appTotal:
description: Neighborhood district used for pre-qualifying addresses for preference
totalSubmittedApps:
type: number
description: 'total number of people who have applied '
description: Total number of applications that have claimed preference
unitsAvailable:
type: number
description: 'total units available '
description: Total units available for preference
ShortFormPreference:
type: object
description: Application preference
Expand Down Expand Up @@ -1499,40 +1535,6 @@ definitions:
incomeMatch:
type: boolean
description: does income match passed criteria
LotteryBucket:
type: object
description: list of application results by preference
properties:
PreferenceName:
type: string
description: 'Preference name, (liveWork,COP,DCP,Neighborhood)'
TotalSubmitted:
type: number
description: total applications for preference
UnitsAvailable:
type: number
description: total slots for preference
PreferenceResults:
type: array
items:
$ref: '#/definitions/PreferenceResult'
PreferenceResult:
type: object
description: ApplicationResult
properties:
applicationID:
type: string
description: ApplicationID ID
lotteryNumber:
type: string
description: 'the lottery number '
preferenceRank:
type: number
description: raw rank for this live work - which are treated as one preference
lotteryRank:
type: integer
format: int32
description: raw lottery rank returned form drawing
PreferenceBucket:
type: object
description: 'list of application results by preference ( deprecated) '
Expand Down

0 comments on commit 5fc9bba

Please sign in to comment.